The Infinity City is located on an infinite quarterplane.
There is an infinite number of sky-scrapers in the city, there is one sky-scraper
located at every point with integer coordinates.
One unfortunate day there was an earthquake in the city.
There was a huge tectonic crack along the line and all
the sky-scrapers at positions satisfying the inequality
simply disappeared.
The city has now become a Finity City with only a finite number of sky-scrapers.
But exactly how many?
Input
The only line of input contains three space-separated positive integers , , .
They are bounded as follows: , .
Output
Your program should output exactly one integer: the number of sky-scrapers
in the Finity City.
Example
For the input data:
3 4 13
the correct result is:
12
Task author: Jakub Pawlewicz.
Send Feedback
In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.