#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll A, B;

ll func(ll x){
    return floor(A*x/B) - A * floor(x/B);
}

int main(){
    ll N; cin >> A >> B >> N;
    double ok = min(N+1, B);
    double ng = 0;
    for (int i = 0; i < 10000; i++)
    {
        double mid = (ng + ok)/2.;
        double mid1 = (ng * 2 + ok)/3;
        double mid2 = (ng + ok * 2)/3;
        if(func(mid1)>=func(mid2)) ok = mid;
        else ng = mid;
    }

    ll ans = 0;
    for (ll i = max(0LL, (ll)ok-10000000), M = min((ll)ok+10000000, N); i <= M; i++)
    {
        ans = max(ans, (ll)(A*i/B) - A * (ll)(i/B));
    }
    
    cout << ans  << endl;
}