Skip to main content

~/algor $ cat contests/round-5/F

F. Solutions of a Diophantine equation

Problem F ICPC rules 1000 ms 128 MB

You are given positive integers , and a non-negative integer . How many integer solutions with , does the equation have?

The solutions of the equation highlighted as lattice points on a line in the coordinate plane

Input

One line with three integers: , and .

Output

One integer — the number of solutions.

Note


Examples

Input #1
2 3 12
Output #1
3
Input #2
4 6 7
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.