#include <stdio.h>


int main(void){

        long int a,b,n;
        scanf("%ld%ld%ld",&a,&b,&n);
        int ans[n];

        long int A[n],B[n];


        for(long int i=0;i<=n;i++){
                A[i] = a*i/b;
                B[i] = i/b;
                ans[i] = A[i] - a * B[i];
        }   

        for(long int i=0;i<=n;i++){
                for(long int j=0;j<=n-i-1;j++){
                        if(ans[j]<ans[j+1]){
                                int tmp = ans[j];
                                ans[j] = ans[j+1];
                                ans[j+1] = tmp;
                        }   
                }   
        }   

        printf("%d\n",ans[0]);
        return 0;
}
