a,b,c = map(int,input().split()) ans = (c - b)*(c - b)//(b - a) + c print(ans)