#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define BUFSIZE 1000000
int A,B,N;
int result = 0;
int rem[BUFSIZE]={0};
int cal(int x){
  if(x == N + 1) return 0;

  int a=(int)(A*x/B);
  int b= (int)x/B;

  rem[x] = a - b*A;
  if(a - b*A == 0){
    cal(x + 1);
  }
  if(rem[x] >= rem[x-1]) {

    result = rem[x];
  }
  cal(x + 1);
}

int main(void){

  scanf("%d %d %d",&A,&B,&N);


  cal(1);

  printf("%d",result);
}
