import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] t = new int[10]; int n = sc.nextInt() * 3, cnt = 0; for (int i = 0; i < n; i++) { t[sc.nextInt() - 1]++; } for (int i = 0; i < 10; i++) { while (t[i] >= 2) { cnt++; n -= 2; t[i] -= 2; } } cnt += n / 4; System.out.println(cnt); } }