#include<stdio.h>
long long a,b; 
long long f(long long x){return (a*x/b)-a*(x/b);}  
int main(){
  long long m,i,m1,m2,l=0,r;
  scanf("%lld %lld %lld",&a,&b,&r);
  r++;
  while(r-l>10){//printf("%lld %lld\n",l,r);
    m1=(l+l+r)/3;
    m2=(l+r+r)/3;
    //printf("%lld %lld\n",
    if(f(m1)<f(m2))l=m1;
    else           r=m2;
  }
  m=0;
  for(i=l;i<r;i++){
    if(m<f(i))m=f(i);
  }
  printf("%lld\n",m);
  return 0;
}
