Infinity City occupies an infinite quarter-plane: at every point (x,y) with integer coordinates x≥0 and y≥0 there stands exactly one skyscraper, so the city contains infinitely many of them.
One day an earthquake tore a long crack along the line Ax+By=C. Every skyscraper standing at a point with Ax+By>C collapsed and vanished, leaving only the skyscrapers with Ax+By≤C. The city has become finite. Count how many skyscrapers remain.
A single line contains three space-separated positive integers A, B, and C, where 1≤A,B≤109 and 1≤C≤min(A,B)×109.
Print a single integer: the number of skyscrapers that remain in the city.