#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include //#include using namespace std; int main(){ int n; cin>>n; int t=3*n; int y[120]={}; for(int i=0;i>a>>b>>c; y[a]++;y[b]++;y[c]++; } int x=0; for(int i=0;i<=100;i++){ x+=y[i]/2; t-=y[i]-y[i]%2; } x+=t/4; cout<