n = int(input()) a = list(map(int, input().split())) a.sort() count = 1 if a[1] == a[0]: count -= 1 else : count += 1 for i in range(2,n): if a[i] == a[i-1]: if a[i] != a[i-2]: count -= 1 else: count += 1 print(count)