defmodule Main do
  def main do
    [a, b, n] =
      IO.gets("")
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)
    first = floor(a * n / b) - a * floor(n/ b)
    second = floor(a * (n - 1) / b) - a * floor((n - 1) / b)
    if first > second do
      IO.puts(first)
    else
      IO.puts(second)
    end
    #solve(a, b, n, floor(a * n / b) - a * floor(n/ b))
    

  end
end