def season(x):
    """
    Returns a season (as an int value) for a given day of a year
    :param x: int Day of the year
    :return: int with the season value
    """
    fall = range(80, 172)
    winter = range(172, 264)
    spring = range(264, 355)

    if x in spring:
        return 3
    if x in winter:
        return 2
    if x in fall:
        return 1
    else:
        return 4