let read () = Scanf.scanf "%d " (fun i -> i) module H = Hashtbl let () = let n = read () in let tbl = H.create ~random:true n in let rec doit i = if i = n then () else begin let a = read () in if not (H.mem tbl a) then H.replace tbl a 1 else H.replace tbl a (H.find tbl a + 1); doit (i + 1) end in doit 0; H.fold (fun _ n s -> s + if n = 1 then 1 else 0) tbl 0 |> Printf.printf "%d\n"