func main() var n: int :: cui@inputInt() var dic: dict :: #dict var ans: int :: 0 for i(0, n - 1) var ai: int :: cui@inputInt() var cnt: int :: 1 if(dic.exist(ai)) do cnt :: dic.get(ai, &) + 1 end if if(cnt = 1) do ans :+ 1 elif(cnt = 2) do ans :- 1 end if do dic.add(ai, cnt) end for do cui@print("\{ans}\n") end func