// yukicoder: No.538 N.G.S. // 2019.4.19 bal4u #include int main() { long long b1, b2, b3, ans; scanf("%lld%lld%lld", &b1, &b2, &b3); ans = b2 + (b3-b1)*(b3-b2)/(b2-b1); printf("%lld\n", ans); return 0; }