program main
      implicit none
      integer(8) :: a,b,n,x,ans

      read *, a, b, n
      
      if ( n >= b ) then
        x = b-1
        ans = int(a*x/b)
      else
        x = n
        ans = int(a*x/b)
      end if
      print *, ans

end program main
