program main
  integer(kind=8) :: a, b, n, x, d, maximum = 0
  read (*, *) a, b, n
  do x = 0, n
    d = (a * x) / b - a * (x / b)
    if (d > maximum) then
      maximum = d
    endif
  enddo
  write (*, '(i0)') maximum
end program main
