#coding:utf-8 N=input() A=map(int,raw_input().split()) cnt=0 for i in xrange(N): if A.count(A[i]) == 1: cnt+=1 print cnt