n = int(input()) a = [int(x) for x in input().split()] res = 0 cnt = {} for ai in a: if ai not in cnt: cnt[ai] = 0 cnt[ai] += 1 for k,v in cnt.items(): if v == 1: res += 1 print(res)