#include using namespace std; int main() { int64_t b1, b2, b3; cin >> b1 >> b2 >> b3; cout << (((b3 - b1) * (b3 - b2) / (b2 - b1)) + b2) << endl; return 0; }