#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int a,b,c,n;cin>>n; map map; for(;n>0;n--){ cin>>a>>b>>c; map[a]++; map[b]++; map[c]++; } int hoge=0,cnt=0; for(auto itr = map.begin(); itr != map.end(); ++itr) { //cout<<"key="<first<<",val="<second<<"\n"; if(itr->second%2==0){ cnt+=itr->second/2; }else{ cnt+=itr->second/2; hoge++; } } cnt+=hoge/4; cout<