n=int(input()) a=[int(i) for i in input().split()] a.sort() ans=0 if len(a)==1: ans=1 else: for i in range(len(a)): if i==0: if a[i]!=a[i+1]: ans+=1 elif i==len(a)-1: if a[i]!=a[i-1]: ans+=1 else: if a[i]!=a[i-1] and a[i]!=a[i+1]: ans+=1 print(ans)