#include #include #include using namespace std; long long int A, B, C; bool check(long long int mid) { return C <= (long long int)(mid - (mid / A) + B * (mid / A)); } int main() { cin >> A >> B >> C; long long int lb = 0; long long int ub = C; long long int mid = 0; while(ub - lb > 1) { mid = (ub + lb) / 2; if(check(mid)) ub = mid; else lb = mid; } cout << ub << endl; return 0; }