#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long a,b,n;
    long long sum,k1,a1,b1;
    scanf("%lld%lld%lld",&a,&b,&n);
    k1=a/b;

    a1=a%b;

    b1=b-1;
    if(b1>n)
        b1=n;
    sum=k1*b1+(a1*b1)/b;
    printf("%lld",sum);

    return 0;
}
