import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines a,b,c = map(int,read().split()) answer = (c-a) * (c-b) // (b-a) + b print(answer)