#include <stdio.h>
#include <math.h>
typedef long long ll;

ll func(ll a, ll b, ll x)
{
    return floor(a * x / b) - a * floor(x / b);
}

int main()
{
    ll a, b, n, ans;
    scanf("%lld %lld %lld", &a, &b, &n);

    ans = func(a, b, 0);
    for (int i = 1; i <= n; i++)
    {
        if (ans < func(a, b, i))
            ans = func(a, b, i);
    }

    printf("%lld", ans);
    return 0;
}