N = int(raw_input()) input = raw_input().split() cnt = 0 for s in input: if input.count(s) == 1: cnt += 0 print cnt