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

~/algor $ cat problems/arra-bilan-kesish

Sawing a board

Medium 1000 ms 64 MB 41%
Share

Pieces $a$ mm long are sawn from a board $L$ mm long. The board is cut starting from one end, and every cut turns $c$ mm of the board into sawdust. There is one cut between two neighbouring pieces; if the board ends after the last piece or the remaining part is shorter than $a$ mm, the rest is not used. Find the largest number of pieces.

A board of length L; saw kerfs of width c between pieces of length a; a leftover at the end

Input

One line with three integers: $L$, $a$ and $c$.

Output

One positive integer — the number of pieces.

Note

$1 \le a \le L \le 10^{9}$
$0 \le c \le 1000$

Examples

Input #1
100 20 5
Output #1
4
Input #2
17 5 1
Output #2
3

Sign in to submit a solution

Signing up is free and takes a minute.