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