n = int(input()) inp = input().split() st = set(inp) for i in st: inp.remove(i) print(len(st) - len(set(inp)))