y,m,d = list(map(lambda x:int(x), input().split(' '))) import time try: my_time=time.strptime('{} {} {}'.format(y,m,d),'%Y %m %d') # print('日期:{}-{}-{}'.format(y,m,d)) print(my_time.tm_yday) except Exception as ex: print(ex)