import java.util.*; public class Novelty{ public static void main(String... args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); System.out.println(counter(n,scan)); } public static int counter(int n, Scanner scan){ HashMap hash = new HashMap(); for(int i = 0; i < n; i++){ int now = scan.nextInt(); if(!hash.containsKey(now)){ hash.put(now,1); continue; } if(hash.containsKey(now)){ if(hash.get(now)>2)continue; hash.put(now,hash.get(now)+1); } } int count=0; for(int key : hash.values()){ if(key!=1)continue; count++; } return count; } }