#include typedef long long ll; using namespace std; ll INF = 1LL << 61; int MOD = 1e9+7; main(){ ll A,B,C; cin >> A >> B >> C; //n歳のとき n + floor(n/A) * B - floor(n/A) ll ok = INF / B * A,ng = 0; while(abs(ok - ng) > 1){ ll mid = (ok + ng) / 2; ll flo = mid / A; if(mid + flo * (B - 1) >= C)ok = mid; else ng = mid; } cout << ok << endl; }