      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)
 !     buffer = int( floor( reA*reX/reB) - A*floor( reX/reB ) )
 !     ans = max( ans,buffer )
 !     reX = real(N)
 !     buffer = int( floor( reA*reX/reB) - A*floor( reX/reB ) )
 !     ans = max( ans,buffer )
      
      print*,ans
      
      END PROGRAM