def main(): b1, b2, b3 = list(map(int, input().split(' '))) if b1 == b2: return b1 r = (b2 - b3) / (b1 - b2) d = (b3 * b1 - b2 ** 2) / (b1 - b2) return int(r * b3 + d) print(main())