      PROGRAM piyo
      IMPLICIT NONE
      integer(16) :: A,B,N
      integer(16) :: maxB,i,ans,buffer,x
      real(16) :: reA,reB,reX
      
      read*,A,B,N
      
      maxB = (N/B) * B
 !     maxB = maxB - B !念のため
      
 !     maxB = max( maxB,N-10**7 )
      if( maxB<0 ) maxB = 0
      
      ans = 0
 !     do i = N,maxB,-1
 !       
 !       buffer = floor( real(A*i)/real(B) ) - A*floor(real(i)/real(B))
 !       ans = max( ans ,buffer )
 !     end do
      
      reA = real(A)
      reB = real(B)
      
     ! reX = real(maxB-1)
     ! buffer = int( floor( reA*reX/reB) - A*floor( reX/reB ) )
     ! ans = max( ans,buffer )
     ! reX = real( min(N,B-1))
     ! buffer = int( floor( reA*reX/reB) ) - A*int(floor( reX/reB ) )
      
      x = min( N,B-1 )
      if( x<0 ) x = N
      buffer = A*X/B - A*(X/B)
      ans = max( ans,buffer )
      
      print*,ans
      
      END PROGRAM