#include #include using namespace std; int main(){ int n; cin >> n; vector v(10); for (int i=0; i> a >> b >> c; v[a-1]++; v[b-1]++; v[c-1]++; } int item2=0, item1=0; for (int i=0; i<10; i++) { if (v[i]>1) { item2+=v[i]/2; item1+=v[i]%2; } else { item1+=v[i]; } } item1/=4; cout << item2+item1 << endl; return 0; }