ln=list(map(int,input().split())) A=ln[0] B=ln[1] C=ln[2] D=A+B-1 x=C//D total=0 age=0 total+=x*D age+=x*A while total