#include using namespace std; int main(void) { int n, i, j, p=0, sum=0, pa[11] = {0,0,0,0,0,0,0,0,0,0,0}, mo[3]; cin >> n; for (i = 0; i < n; i++) { for (j = 0; j < 3; j++) { cin >> mo[j]; pa[mo[j]] += 1; } } for (i = 1; i < 11; i++) { sum += pa[i] / 2; //cout << sum; p += pa[i] % 2; } sum = sum + p / 4; cout << sum; return 0; }