N = int(input()) A = [int(i) for i in input().split()] A.sort() M = 0 while len(A) != 0: if A.count(A[0]) == 1: M += 1 A.remove(A[0]) else: for i in range(A.count(A[0])): A.remove(A[0]) print(M)