#include using namespace std; int main(){ int n; cin>>n; mapmp; for(int i=0;i>p>>q>>r; mp[p]++; mp[q]++; mp[r]++; } int cnt=0; int mod=0; for(auto itr=mp.begin();itr != mp.end();itr++){ cnt+=(itr->second)/2; mod+=(itr->second)%2; if(mod>=4){ cnt++; mod-=4; } } cout<