#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define ll long long int

int main(){
  ll a,b,n;
  scanf("%lld%lld%lld",&a,&b,&n);

  ll max=0;
  ll k2=a/b;
  ll d1;
  ll d2=a%b;
  if(b<=n){
    d1=b-1;}
  else{
    d1=n;}
  max=k2*d1+d1*d2/b;

  printf("%lld\n",max);
  
  return 0;
}
