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 count acc =
        if i = n then acc + count mod 2 else
            if a.(i) = a.(i - 1) then loop (i + 1) (count + 1) acc else
                loop (i + 1) 1 (acc + count mod 2)
    in
    loop 1 1 0 |> Printf.printf "%d\n"
)