/* * 538.cpp */ //include files #include using namespace std; //DEFINE MACROS #define MIN(a,b) (a>b?b:a) #define MAX(a,b) (a>b?a:b) #define PRINTLN(s) cout << s << endl //DEFINE CONSTANT //DEFINE PROTOTYPE int main(){ long long int b1,b2,b3; double r,d; long long int answer; cin >> b1; cin >> b2; cin >> b3; r = (double) (b3 - b2) / (b2 - b1); d = b2 - r * b1; answer = b3*r + d ; cout << answer << "\n"; return 0; }