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

int main(){
  int A;
  unsigned long long int B,N;
  int max;
  scanf("%d %lld %lld",&A,&B,&N);
  max = 0;
  for(int i=0;i<100;i++){
    //printf("%d",(int)floor(A*i/B) + (int)floor(i/B)*A);
    if(floor(A*i/B) - floor(i/B)*A > max){
      max = floor(A*i/B) - floor(i/B)*A;
      //printf("x=%d  max = %d\n",i,max);
    }
  }
  printf("%d",max);
  return 0;
}