import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; import java.util.List; import java.util.Arrays; import java.util.ArrayList; import java.util.Deque; import java.util.ArrayDeque; import java.util.Collections; public class Main { public static void main(String[] args) { FS reader = new FS(); // write reader int N = reader.nextInt(); int[] a = new int[10]; for (int i=0; i<3*N; i++) { a[reader.nextInt()-1]++; } // solve int ans = 0; for (int i=0; i<10; i++) { ans += a[i]/2; } ans += (N*3-ans*2)/4; System.out.println(ans); } public static void output2DArray(boolean[][] a, int r) { for (int x=0; x