# your code goes here #new N=int(input()) A=[int(i)for i in input().split()] A.sort() C=0 if A[0]!=A[1]: C+=1 # print (C) for i in range(1,N-1): if A[i]!=A[i-1] and A[i]!=A[i+1]: C+=1 # print (A[i-1]) # print (A[i]) if A[N-2]!=A[N-1]: C+=1 print(C)