#include using namespace std; using LL = long long; using ULL = unsigned long long; ULL A, B, C; ULL calc(ULL x) { ULL d = x / A; return d * B + x - d; } int main() { cin >> A >> B >> C; LL left = 0, right = C + 1; while (right - left > 1) { LL mid = (left + right) / 2; if (C <= calc(mid)) { right = mid; } else { left = mid; } } cout << right << endl; }