Competitions
Задачі для початківців
Calendar
SmallNicephorusconstantlyforgetshow old he is.Sohisparentswere hanged inhis room,calendar,wherespecificallymarkedbirthdayNicephorus.Butconsiderhow muchhis age, dateof birth andcurrent dateNicephorusdid notknow how.Help him!
Input
The first line ofthe input filegiven threepositive integers: day, monthandyearof the birth ofNicephorus.The second linegiventhe current datein the same format.Yearsin boththe datesdo not exceed105 andensures that thedate of birthNicephorusstrictlybeforethe current date.
Output
The outputfileoutputa single number- the age ofNicephorus.
Input example #1
12 4 2003 17 7 2010
Output example #1
7
Input example #5
12 4 2003 30 3 5010
Output example #5
3006