import java.util.*; import java.util.stream.IntStream; public class Main{ static Scanner s=new Scanner(System.in); static int getInt(){return Integer.parseInt(s.next());} static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} public static void main(String[]$){ HashMaph=new HashMap<>(); INS(getInt()*3).forEach(i->h.merge(i,1,Integer::sum)); Collectionb=h.values(); System.out.println( b.stream() .filter(i->i%2==1) .count()/4 +b.stream() .mapToInt(i->i/2) .sum() ); } }