def calc_salary(s_from, s_to):
    """Calc salary.
    First modify salary to get 'from', 'to'

    :param s_from: int, salary from
    :param s_to: int, salary to
    :return: int or None, size of salary by 'from' and 'to'
    """

    if (s_from is not None and s_to is not None):
        return (s_from + s_to) / 2

    # if we there that means 'from' or 'low' salary is None but only one
    # from is lowest salary of range, multiply by highly coefficient
    if s_from is not None:
        return s_from * 1.2

    # to is highest salary of range, multiply by lowly coefficient
    if s_to is not None:
        return s_to * 0.8

    return None