#include #include #include #include #include #include #include #include using namespace std; #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(), (x).rend() #define rep(i,n) for(int i=0;i > pii; int main(){ int n,x,A[10]={0},sum=0,ans=0; cin >> n; rep(i,n){ rep(j,3){ cin >> x; A[x-1]++; } } rep(i,10){ ans+=A[i]/2; A[i]%=2; sum+=A[i]; } cout << ans+sum/4 << endl; return 0; }