      PROGRAM piyo
      IMPLICIT NONE
      integer(16) :: A,B,N
      integer(16) :: maxB,i,ans,buffer
      
      read*,A,B,N
      
      maxB = (N/B) * B
      maxB = maxB - B !念のため
      if( maxB<0 ) maxB = 0
      
      ans = 0
      do i = N,maxB,-1
        
        buffer = int(floor( real(A*i)/real(B) )) - A*int(floor(real(i)/real(B)))
        if( buffer>ans ) ans = buffer
      end do
      
      print*,ans
      
      END PROGRAM