import sys input=lambda: sys.stdin.readline().rstrip() b1,b2,b3=map(int,input().split()) print((b3-b1)*(b3-b2)//(b2-b1)+b2)