N = int(input()) A = sorted([int(i) for i in input().split()]) count = 0 num = [] isOnly = True for i in range(1,N): if A[i-1] == A[i]: count +=1 num.append(A[i]) print(N - count - len(set(num)))