#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int INF = (1 << 30) - 1; const ll INFLL= (1LL << 61) - 1; const int MOD = 1000000007; #define ALL(a) (a).begin(),(a).end() #define rALL(a) (a).rbegin(),(a).rend() #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int N; cin>>N; map mp; REP(i,N){ int a,b,c;cin>>a>>b>>c; mp[a]++;mp[b]++;mp[c]++; } int ans=0,mod=0; FOR(i,1,11){ ans+=mp[i]/2; mod+=mp[i]%2; } ans+=mod/4; cout<