let () =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let ds = Array.init n (fun _ -> Scanf.scanf "%d\n" (fun d -> d)) in
  Array.to_list ds
  |> List.sort compare
  |> List.fold_left (fun (n, prev) d ->
      ((if prev < d then 1 + n else n), d)) (0, 0)
  |> fst
  |> Printf.printf "%d\n"