A time of day is represented by three integers: hours, minutes, and seconds. A time is called good if one of these integers equals the sum of the other two.
Given two times on the same day in the 24-hour format, count the good times between them, including both endpoints.
There is only one test case in each test file.
The first line contains three integers $$$h_1$$$, $$$m_1$$$, and $$$s_1$$$ ($$$0\le h_1\le23$$$, $$$0\le m_1,s_1\le59$$$), representing the hours, minutes, and seconds of the starting time, respectively.
The second line contains three integers $$$h_2$$$, $$$m_2$$$, and $$$s_2$$$ ($$$0\le h_2\le23$$$, $$$0\le m_2,s_2\le59$$$), representing the hours, minutes, and seconds of the ending time, respectively.
It is guaranteed that the starting time is no later than the ending time.
Print one integer: the number of good times.
0 2 00 3 0
1
1 45 461 46 45
2
23 36 5923 36 59
1
In the first example, the only good time is $$$00{:}02{:}02$$$, since $$$0+2=2$$$, so the answer is $$$1$$$.
In the second example, the good times are $$$01{:}45{:}46$$$ and $$$01{:}46{:}45$$$, so the answer is $$$2$$$.
| Name |
|---|


