#coding:utf-8 N=input() A=map(int,raw_input().split()) A=sorted(A) cnt=0 for i in range(N-1): if A[i-1]!=A[i] and A[i]!=A[i+1]: cnt+=1 if A.count(A[-1]) == 1: cnt+=1 print cnt