B = list(map(int, input().split())) r = (B[2] - B[1])/(B[1] - B[0]) d = B[2] - r * B[1] print(int(r * B[2] + d))