from datetime import datetime


def day_of_year(year:int,
                month:int,
                day:int)->int:
    """
    Calculate day of year from a date
    """
    doy = datetime(year, month, day).timetuple().tm_yday
    return doy