def caloria_function(is_male: bool, weight: float, height: float, age: float, sport_a_week: int) -> float:
    """
    Calculates 24hour calory need.
    Returns -1 in any error case.
    :param is_male: True/False. Does human have MALE sex?
    :param weight: float, kilograms
    :param height: float, santimeters
    :param age: float, years
    :param sport_a_week: int, times. do sport times a week amount.
    :return:
    """

    bmr = -1

    if is_male:
        bmr = 88.36 + (13.4*weight) + (4.8 * height) + (5.7 * age)
    else:
        bmr = 447.6 + (9.2 * weight) + (3.1 * height) + (4.3 * age)

        return bmr

    if sport_a_week <= 0:
        bmr *= 1.2
    elif 3 >= sport_a_week >= 1:
        bmr *= 1.375
    elif 5 >= sport_a_week > 3:
        bmr *= 1.55
    elif 7 >= sport_a_week > 5:
        bmr *= 1.725
    else:
        bmr *= 1.9

    return bmr