#include #include #include #include #include #include #include #include using namespace std; int main(){ int n; cin >> n; vector itm(10); for(int i=0;i> tmp[0] >> tmp[1] >> tmp[2]; itm[tmp[0]-1]++; itm[tmp[1]-1]++; itm[tmp[2]-1]++; } int cnt=0; int fl=0; for(int i=0;i<10;i++){ if( itm[i]%2 == 0 ){ cnt += itm[i]/2; }else{ cnt += itm[i]/2; fl++; } } cnt += fl/4; cout << cnt << endl; return 0; }