eolymp
bolt
Try our new interface for solving problems
Problems

Monk the Charles Greats

Monk the Charles Greats

Time limit 0.1 seconds
Memory limit 64 MiB

Charles Greats was indeed the Great, as he thought about the future inhabitants of the country. In one of the first known school in Aachen, he was invited to teach math 795 monks Alkuina that his students suggested the following problem:

"100 sheffels (monetary units) divided between men, women and children and made with men in 3 sheffels, with women in 2 sheffels and children of floor sheffels. How many men, women and children?"

General solution of linear Diophantine equations in those days did not know and were content with a few solutions that satisfy the problem. At the very Alkuina was given only one solution to this problem: men, women and children were 11, 15 and 74, and the problem actually has 784 solutions in natural numbers.

We offer you to go further in the way of assimilation of Diophantine equations and solve a similar puzzle as follows: "C sheffels divided between men, women and children. Men were given A sheffels, women - the B sheffels, and children, as in ancient times, at half sheffels."

How many solutions in positive integers has this problem?

Input data

In a single line given three positive integers: A, B and C. All input data does not exceed 1000.

Output data

Derive a single number - the answer of the problem.

Examples

Input example #1
3 2 100
Output example #1
784