year=int(input("please input the year(must be int):"))
while True:
month=int(input("please input the month(must be int):"))
if month>12:
print("your month out of range")
else:
break
day=int(input("please input the day(must be int):"))
if ((year%4)!=0) or ((year%100)==0):
a=0
else:
a=1
months=[31,28,31,30,31,30,31,31,30,31,30,31]
days=0
for i in range(month-1):
days=days+months[i]
days=days+day+a
print(f"It is the {days}th day")