Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

C. Cake Cutting
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Examples
Input
2 3 1
Output
4
Input
2 2 1
Output
4
Input
9 6 3
Output
799