def main(): N = int(input()) A = tuple(map(int, input().split())) num = dict() for i in A: num[i] = num.get(i, 0) + 1 ans = 0 for i in num.values(): if i == 1: ans += 1 print(ans) main()