#include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); double b1, b2, b3; cin >> b1 >> b2 >> b3; double r = (b3 - b2) / (b2 - b1); long result = static_cast(b3 + (b3 - b2) * r); cout << result << "\n"; }