num = input() L = list(map(int, input().split())) cc = 0 for e in set(L): if L.count(e) == 1: cc += 1 print(cc)