#include #include #include #include #include #include #include using namespace std; #define diff(x, y) ((x) > (y) ? ((x) - (y)) : ((y) - (x))) int main(void) { int n, no, ans = 0, sum = 0; cin >> n; vector x(11, 0); for (int i = 0; i < n * 3; i++) { sum++; cin >> no; x[no]++; if (x[no] >= 2) { ans++; sum -= 2; x[no] -= 2; } } cout << ans + sum / 4<< endl; return 0; }