N = int(input()) #nums = map(int,input().split()) nums = [int(x) for x in input().split()] num_dict = {} for num in nums: num_dict.setdefault(num,0) num_dict[num]+=1 newly = len([x for x in num_dict.items() if x[1] == 1]) print(newly)