#include using namespace std; #define rep(i,j,n) for(int i=j;i pi; template using vt = vector; template using vvt = vector>; i64 gcd(i64 n, i64 m) {return (m == 0? n : gcd(m, n % m));} i64 lcd(i64 n, i64 m) {return (n / gcd(n, m) * m);} int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; i64 a, b, c; bool check(i64 m) { i64 t = b * (m / a) + m - (m / a); return (t < 0 || t >= c); } i64 binary_search() { i64 ng = 0, ok = c; while(abs(ok - ng) > 1) { i64 mid = ng + (ok - ng) / 2; if(check(mid)) ok = mid; else ng = mid; } return ok; } int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> c; cout << binary_search() << endl; }