e-olymp
Problems

Calendar

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.

Time limit 1 second
Memory limit 64 MiB
Input example #1
12 4 2003
17 7 2010
Output example #1
7
Input example #8
22 5 2011
22 5 2014
Output example #8
3
Source Stage II Ukrainian School Olympiad 2011-2012, Berdichev