A pipeline of length kilometers is constructed using pipes, each of length kilometers (the last pipe may be shorter). Supports are installed every kilometers along the pipeline (that is, at points , , , ...; supports are not placed at the start or end of the pipeline).
Determine how many times along the pipeline a support installation point exactly coincides with a pipe joint.
In the first given example, the pipe joint and support coincide at points , , ; in the second example, they coincide at points and .
The first line contains the number . The second line contains the number . The third line contains the number . The lines contain only digits and possibly a decimal point. After the third line, there is a newline character.
All three numbers are positive and not necessarily integers. Each number has at most decimal digits and may include a decimal point. The numbers , , are given exactly.
Output a single integer — the answer to the problem.
Example 1