#include #include using namespace std; int main(void) { unsigned long long a, b, c, ng = -1, ok = ULLONG_MAX / 100000; cin >> a >> b >> c; while (ok - ng > 1) { unsigned long long mid = (ok + ng) / 2, key = (mid / a * b) + (mid - mid / a); if (key >= c) ok = mid; else ng = mid; } cout << ok << endl; return 0; }