#include using namespace std; #define REP(i,n) for(int i=0;i>N; int a[10]={0}; REP(i,N){ int x,y,z; cin>>x>>y>>z; a[x-1]++; a[y-1]++; a[z-1]++; } int b=0; REP(i,10){ ans+=a[i]/2; b+=a[i]%2; } ans+=b/4; cout<