n=int(input()) s=set() a=set(map(int,input().split())) # for i in range(n): # s.add(a) if n==len(a): print(0) else: f=n-len(a) print(f)