import strutils, sequtils, algorithm, future {.warning[SmallLshouldNotBeUsed]: off.} when isMainModule: var b = stdin.readLine.split.map(parseFloat) r = (b[2] - b[1]) / (b[1] - b[0]) d = b[1] - r*b[0] if r*b[2] + d == (r*b[2] + d).int.float: echo((r*b[2] + d).int) else: echo((r*b[2] + d + 1e-8).int)