#include #include using namespace std; int main(void){ int N,res = 0,p; int item[11] = { 0 }; cin >> N; while (N--){ cin >> p; item[p]++; cin >> p; item[p]++; cin >> p; item[p]++; } p = 0; for (int i = 1; i < 11; i++){ res += item[i]>>1; p += item[i] & 1; } res += p / 4; cout << res << endl; return 0; }