import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
public class Main{
	public static void main(String args[])throws Exception{
		Scanner sc=new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());
		HashMap<Integer,Integer>map=new HashMap<Integer,Integer>();
		LinkedList<Integer>queue=new LinkedList<Integer>();
		for(int i=0;i<n;i++){
			int temp=sc.nextInt();
			if(!map.containsKey(temp)){
				map.put(temp,1);
				queue.offer(temp);
			}else{
				map.put(temp,map.get(temp)+1);
			}
		}int counter=0;
		for(Integer element:queue){
			if(map.get(element) == 1){
				counter++;
			}
		}System.out.println(counter);
	}
}