Under construction

Still being built. Things may change

Arno's Sleep Schedule

Time limit1sMemory limit1024 MB

Summary
Given the hour Arno goes to sleep and the hour his alarm rings, print how many hours he sleeps, wrapping past midnight when needed.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Arno wants to arrive at school before classes start, so he sets an alarm clock for the morning. He wonders how many hours he will sleep. Write a program that calculates the length of Arno's sleep.

Input

There are two lines in the input, each containing one number. The first line contains an integer from 2020 to 2323 or from 00 to 33: the time Arno goes to sleep. The second line contains an integer from 55 to 1010: the time at which Arno's alarm rings and wakes him up. All times are integers in 24-hour format.

Output

Output a single integer: the number of hours from the time Arno goes to sleep to the time he wakes up. You may assume that Arno sleeps continuously from the time he goes to sleep until the alarm rings, and that he does not sleep for more than 2424 hours in a row. NB! The output must not contain any other words or symbols, so it should contain exactly one integer.

Examples1

  1. Example 1

    Input
    23
    7
    
    Expected output
    8