#include using namespace std; int main() { int N; cin >> N; int array[10]; for(int i = 0; i < 10; i++) array[i] = 0; for(int i = 0; i < 3 * N; i++) { int tmp; cin >> tmp; array[tmp - 1]++; } int A = 0; int B = 0; for(int i = 0; i < 10; i++) { int tmp = array[i] / 2; A += tmp; B += array[i] - tmp * 2; } cout << (A + B / 4) << endl; return 0; }