#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define rep(i,n) for(int i = 0; i < (n); i++) #define pb push_back #define eb emplace_back #define fi first #define se second #define all(x) x.begin() , x.end() #define vi vector #define vll vector #define vb vector const static int INF = 1001001001; const static ll LINF = 1001001001001001001LL; const static ld PI = 3.1415926535897932384626L; const static int MOD = int(1e9) + int(7); //const static ll MOD = ll(1e9) + ll(7); //const static int MOD = 998244353; //const static int MOD = 998244353; const static int MX = 202020; ll gcd (ll a , ll b) { if (a < b) swap(a , b); if (a % b == 0) return b; else return gcd (b , a % b); } ll lcm (ll a , ll b) { return (a / gcd (a , b) * b); } int keta (ll x) { int ret = 0; while(x) { ret++; x /= 10; } return ret; } inline int in () { int x; scanf("%d" , &x); return x; } inline ll lin () { ll x; scanf("%lld" , &x); return x; } /* //memo v.erase(unique(all(v)), v.end()); */ int main () { ull a , b , c; cin >> a >> b >> c; ull ok = (ll)(1LL<<63)-1; ull ng = -1; while (ok - ng > 1) { ull mid = (ok + ng) / 2; ull cost = mid - mid / a + mid / a * b; if (cost >= c) ok = mid; else ng = mid; } cout << ok << endl; return 0; }