405101: GYM101790 K Forbidden messenger
Description
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.
InputThe 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).
OutputPrint single integer: the maximum number of messages that Pavel may receive.
ExamplesInput2Output
10 20
5Input
3Output
20 10
8