b1, b2, b3 = map(int, input().split()) numerator = (b3 - b2) * (b3 - b1) denominator = b2 - b1 a4 = numerator // denominator + b2 print(a4)