b1, b2, b3 = map(int, input().split())
if b1 == b2:
    print(b3)
    exit()
r = (b3 - b2) / (b2 - b1)
d = b2 - r * b1
print(round(r * b3 + d))