#include using namespace std; int main() { int b1, b2, b3, b4; double r, d; cin >> b1 >> b2 >> b3; r = 1.0 * (b3 - b2) / (b2 - b1); d = b2 - r * b1; // cout << r << ", " << d << endl; b4 = r * b3 + d; cout << b4 << endl; return 0; }