from decimal import ROUND_HALF_UP, Decimal def main(): b = list(map(Decimal, input().split())) if b[0] == b[1]: print(b[0]) return r = ((b[2]-b[1])/(b[1]-b[0])) d = b[1] - r*b[0] print((r*b[2]+d).quantize(Decimal("0"), rounding=ROUND_HALF_UP)) if __name__ == "__main__": main()