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