2987 - Earthquake

给定a,b,c,求满足方程Ax+By<=C的非负整数解 A,B<=10^9.C<=Min(A,B)*10^9

Input

Output

Examples

Input

3 4 13

Output

12
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题