# -*- coding: utf-8 -*- n = int(input()) a = [i for i in input().split()] result = 0 for i in set(a): if a.count(i) == 1: result +=1 print(result)