n = int(input()) an = list(map(int, input().split())) bn = list(set(an)) c = 0 for i in bn: if an.count(i) == 1: c += 1 print(c)