# -*- coding: utf-8 -*-
__author__ = 'manman'

"""
1.判断用户输入的年月日，然后判断这一天是当年的第几天。
2.随机生成20个10以内的数字，放入数组中，然后去掉重复的数字。然后打印数组。
"""


# 根据出生年先判断是平年还是闰年，得出2月份天数，各月份天数相加即可。




# year = int(input("请输入年份： "))
# march = int(input("请输入月份： "))
# days = int(input("请输入日子： "))
# def feb_days():
#     for i in range():
#         if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
#             xadct.valus({'feb': 28})
#             days = days + xadct.valus()
#             return(days)
#          else:
#             return(days + 1)


def is_leap(year):
    """
    判断是否是瑞年
    :param year:
    :return:
    """
    if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
        return True
    else:
        return False


def print_days_of_year(year, month, day):
    """
    打印当前天是这一年的第几天
    :param year:
    :param month:
    :param day:
    :return:
    """
    month_days = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}
    if is_leap(year):
        month_days[2] = 29
    full_month_day_count = 0
    for i in range(1, month):
        full_month_day_count += month_days[i]
    total_days = full_month_day_count + day
    print(total_days)

if __name__ == '__main__':
    year = int(input('Please input year:'))
    month = int(input('Please input month:'))
    day = int(input('Please input day:'))
    print_days_of_year(year, month, day)
