eolymp
bolt
Try our new interface for solving problems
Problems

Calendar

Calendar

Time limit 1 second
Memory limit 64 MiB

Small Nicephorus constantly forgets how old he is. So his parents were hanged in his room, calendar, where specifically marked birthday Nicephorus. But consider how much his age, date of birth and current date Nicephorus did not know how. Help him!

Input data

The first line of the input file given three positive integers: day, month and year of the birth of Nicephorus. The second line given the current date in the same format. Years in both the dates do not exceed 10^5 and ensures that the date of birth Nicephorus strictly before the current date.

Output data

The output file output a single number - the age of Nicephorus.

Examples

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
Source Stage II Ukrainian School Olympiad 2011-2012, Berdichev