#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVL; typedef vector VVI; typedef pair P; typedef pair PL; int main() { double b1, b2, b3; cin >> b1 >> b2 >> b3; double r = (b3 - b2) / (b2- b1); double d = b2 - r * b1; double b4 = r * b3 + d; cout << (int)round(b4) << endl; return 0; }