def get_savwriter_integer_format(series):
    """
    Derive the required SAV format value for the given integer series.

    savReaderWriter requires specific instructions for each variable
    in order to correctly create target variables. This function
    determines the width of the maximum integer in the given series
    and constructs that format string accordingly.

    Parameters
    ----------
    series : pandas.Series
        The series for which the format string is being generated.

    Returns
    -------
    fmt : str
        The format string describing the given integer series.
    """

    fmt = 'F%s' % (
        len(str(series.dropna().astype('int').max()))
    )
    return fmt