Skip to main content

~/algor $ cat contests/round-8/B

B. Is the first time earlier?

Problem B ICPC rules 1000 ms 64 MB

Two times of the same day are given: hours minutes and hours minutes (in -hour format). Check whether the statement is true: “the first time is earlier than the second”. If the times are equal, the statement is false.

Two points on a time axis; the first is to the left of the second

Input

One line with four integers: , , and .

Output

One integer: if the statement is true, otherwise .

Note


Examples

Input #1
9 45 10 5
Output #1
1
Input #2
14 30 14 30
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.