let (a, b, n) = Scanf.sscanf (read_line ()) "%d %d %d" @@ fun a b n -> (float a, float b, float n)

let f x = int_of_float @@ floor (a *. x) /. b -. a *. floor (x /. b)

let () = Printf.printf "%d\n" @@ f @@ min (b -. 1.) n