/* * 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; cin >> b1; cin >> b2; cin >> b3; cout << b3*(b3 - b2) / (b2 - b1) + b2 - (b3 - b2) / (b2 - b1) * b1 << endl; return 0; }