AT_past19_a 毎時運行
Description
There is a bus stop where buses depart at $ X $ minutes past each hour. For example, if $ X=10 $ , buses depart at $ 0:10 $ , $ 1:10 $ , $ \ldots $ , and $ 23:10 $ . No buses depart at any other time.
It is currently $ M $ minutes past $ H $ ( $ M\neq X $ ). How many minutes are left before the next bus departs?
Input Format
The input is given from Standard Input in the following format:
> $ X $ $ H $ $ M $
Output Format
Print the answer as an integer.
Explanation/Hint
### Sample Explanation 1
It is $ 14:10 $ now. The next bus departs at $ 14:30 $ , which is $ 20 $ minutes from now.
### Sample Explanation 2
It is $ 23:30 $ now. The next bus departs at $ 0:12 $ on the next day, which is $ 42 $ minutes from now.
### Constraints
- $ 0\leq H \leq 23 $
- $ 0\leq X,M \leq 59 $
- $ X\neq M $
- All input values are integers.