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))