Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    Array.sort compare a;
    let rec loop i acc =
        if i = n then acc else
            loop (i + 1) (if a.(i) = a.(i - 1) then acc - 1 else acc + 1)
    in
    loop 1 1 |> Printf.printf "%d\n"
)