package yukicoder; import java.util.Scanner; public class No_29v2 { public static void main(String[] args) { int[] item = new int[11]; Scanner sc = new Scanner(System.in); int N = sc.nextInt() * 3; for(int i = 0; i < N; i++){ item[sc.nextInt()]++; } int C = 0; for(int i = 1; i <= 10; i++){ if(item[i] >= 2){ while(item[i] >= 2){ item[i] -= 2; C++; } } } int PUC = 0;//Power UP Counting for(int i = 1; i <= 10; i++){ if(item[i] != 0){ item[i] -= 1; PUC++; } if(PUC == 4){ PUC = 0; C++; } } System.out.println(C); } }