There is no doubt that everybody that has
ever been on a long flight to either the east or the west, is familiar
with the phenomenon of jet lag. During the day you feel tired and you want
to sleep and overnight you are awake in bed. However, your biorhythm is
adjusted to the circumstances in a few days. To calculate the amount of
days
departure between | |
---|---|
8:00 en 12:00 | 0 |
12:00 en 18:00 | 1 |
18:00 en 22:00 | 3 |
22:00 en 01:00 | 4 |
01:00 en 08:00 | 5 |
arrival between | |
---|---|
8:00 en 12:00 | 4 |
12:00 en 18:00 | 2 |
18:00 en 22:00 | 0 |
22:00 en 01:00 | 1 |
01:00 en 08:00 | 3 |
In the borders that are used to determine
The input consists of 4 lines that each
contain a natural number, the respective values
One line stating the number of days it takes to recover from jet lag after a flight of which the parameters are described in the input.
Input:
7 4 7 19
Output:
0.95