# -*- coding: utf-8 -*-
"""
num1=100000*0.01
num2=200000*0.75+num1
num3=400000*0.05+num2
num4=400000*0.03+num3
num5=600000*0.015+num4
num6=1000000*0.01+num5
def num():
if num1>=i:
numx=i*0.01
elif 100000<=i<=200000:
numx=num1+(i-100000)*0.75
elif 200000<=i<=400000:
numx=num2+(i-200000)*0.05
elif 400000<=i<=600000:
numx=num3+(i-400000)*0.03
elif 600000<=i<=1000000:
numx=num4+(i-600000)*0.015
elif i>=1000000:
numx=num5+(i-1000000)*0.01
print ‘liruwei:‘,numx
if __name__==‘__main__‘:
i=input(‘enter:‘)
num()
"""
year=int(raw_input("input year:"))
month=int(raw_input("input month:"))
day=int(raw_input("input day:"))
months = (0,31,59,90,120,151,181,212,243,273,304,334)
if (1<=month<=12):
days=months[month-1]+day
else:
print "month errors!"
leap=0
if ((year%4==0) and (year%100!=0)) or (year%400==0):
leap=1
if (leap==1) and (month>=2):
days+=1
print ‘it is the %dth day.‘% days