import collections a=int(input()) b=input().split() d=collections.Counter(b) e=0 for i in d: if d[i]==1: e+=1 print(e)