#include #include int main(){ std::mapse; int i=0,n,x,c=0,r=0; for(scanf("%d",&n);i<3*n;i++)scanf("%d",&x),se[x]++; for(std::map::iterator it=se.begin();it!=se.end();++it)r+=it->second/2,c+=it->second%2; printf("%d\n",r+c/4); }