시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB23251376126661.278%

문제

Meredith runs a taxi service called Ruber which offers rides to clients in small towns in western Pennsylvania. She wants to get every possible dime out of people who use her taxis, so her drivers charge a flat fee not per minute but per second. It’s important, therefore, to be able to determine the exact amount of elapsed time between the moment a client enters a cab until the moment they leave. Trying to write a program to do this has driven Meredith crazy (pun intended) so she’s come to you for some help.

입력

Input consists of two lines: the first contains the start time and the second contains the end time for a single taxi ride. Each time is of the form hh : mm : ss, giving the hour, minute and seconds. Meredith uses a 24 hour clock, with 0 : 0 : 0 representing 12 midnight and 23 : 59 : 59 representing one second before midnight. Note that the end time may have a value less than the start time value if the ride spans midnight (see the last sample test case for an example of this).

출력

Display the number of seconds between the two times. No cab ride will be equal to or longer than 24 hours.

예제 입력 1

10 : 0 : 0
11 : 0 : 0

예제 출력 1

3600

예제 입력 2

13 : 30 : 52
13 : 31 : 7

예제 출력 2

15

예제 입력 3

23 : 0 : 0
1 : 30 : 0

예제 출력 3

9000