N = int(raw_input()) input = tuple(map(int, raw_input().strip().split())) cnt = 0 for i in set(input): if input.count(i) == 1: cnt += 1 print cnt