import calendar


def days_in_year(year: int) -> int:
    """Returns the number of days in the year

    Args:
        year (int): The year.

    Returns:
        int: The number of days in the year.
    """
    return 366 if calendar.isleap(year) else 365