month=[0,31,28,31,30,31,30,31,31,30,31,30,31] def isLeap(year): if year%4==0 and year%100!=0 or year%400!=0: return 1 return 0 day1=int(input()) day2=int(input()) y1=day1//10000 m1=day1//100%100 d1=day1%100 y2=day2//10000 m2=day2//100%100 d2=day2%100 ans=0 # if day1<day2: # swap(day1,day2) while y1<y2 or m1<m2 or d1<d2: d1+=1 if isLeap(y1): month[2]=29 else: month[2]=28 if d1==month[m1]+1: m1+=1 d1=1 if m1==13: y1+=1 m1=1 ans+=1 print(ans)