import collections M = int(input()) N = list(map(int, input().split(" "))) count = collections.Counter(N).most_common() length = int(len(count)) num = 0 for i in range(length): if count[i][1] == 1: num += 1 print(num)