b1, b2, b3 = map(int, input().split()) r = (b3 - b2) / (b2 - b1) d = b3 - r * b2 b4 = r * b3 + d print(int(b4))