b1, b2, b3 = map(float, raw_input().split()) r = (b3 - b2) / (b2 - b1) d = b2 - r * b1 y1 = (r * b3) + d print int(y1)