#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair pii; typedef vector vll; typedef vector vi; typedef vector> vvi; typedef vector> vvll; const ll inf = 1e16; const ll md = 1000000007; int main() { int n; cin>>n; vi cnt(10); rep(i,n){ int a,b,c; cin>>a>>b>>c; cnt[a-1]++; cnt[b-1]++; cnt[c-1]++; } int ans=0; int r=0; rep(i,10){ ans+=cnt[i]/2; r+=cnt[i]%2; } ans+=r/4; cout<