N = int(input()) A = input().split() print(sum([A.count(Ai) == 1 for Ai in A]))