#include <stdio.h>
#include <math.h>

int main(){
    long int a,b,n;
    long int x,m = 0;
    int cnt = 0;

    scanf("%ld %ld %ld", &a, &b, &n);

    for(long int i = n; i > 0; i--){
        x = a * i / b - a * (i / b);
    
        if(x >= 0 && x >= m){
            m = x;
            cnt++;
            if(cnt == 5) break;
        }
    }
    
    printf("%ld", m);

}