Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

K. Forbidden messenger
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

A popular messenger will be blocked in X hours. Until this time Nikolay wants to send as many messages as possible to Pavel.

Nikolay writes one message A minutes, after which it is delivered B minutes. Nikolay can start to write a new message immediately after sending the previous one, but he will not send it until the previous one is delivered, even if he has enough time to finish it before.

Determine how many messages Pavel may receive before the messenger is blocked. If some message comes to Pavel at the time of blocking, it will be received successfully.

Input

The first line contains one integer X, denoting the number of hours to the messenger blocking (1 ≤ X ≤ 24).

The second line contains two integers: A is the number of minutes required to write a message, and B is the number of minutes required to deliver a message (1 ≤ A, B ≤ 60).

Output

Print single integer: the maximum number of messages that Pavel may receive.

Examples
Input
2
10 20
Output
5
Input
3
20 10
Output
8