Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/while-shilliqqurt-va-devor

Snail and wall

Medium 1000 ms 64 MB 46%
Share

A snail crawls up from the foot of a wall $H$ metres high. Every day it climbs $A$ metres during the day and slides down $B$ metres at night ($A \gt B$). If during the day the snail reaches height $H$ or more, it is considered to have reached the top (it does not slide that night). Determine on which day the snail reaches the top of the wall.

Reaching the top of the wall through daytime climbs and nighttime slides

Input

One line with three integers: $H$, $A$ and $B$.

Output

One integer — the number of the day the snail reaches the top.

Note

$1 \le H \le 10^{6}$
$1 \le B \lt A \le 10^{6}$

Examples

Input #1
10 3 1
Output #1
5
Input #2
5 6 2
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.