import collections N = int(input()) A = list(map(int, input().split())) B = [K for K, V in collections.Counter(A).items() if V > 1] print(len(set(A)) - len(B))