#include using namespace std; int main(void){ int n, cnt[10],tot,ans; cin >> n; tot=0; for (int i=0; i<10; i++) cnt[i]=0; for (int i=0; i> a >> b >> c; cnt[a-1]++; cnt[b-1]++; cnt[c-1]++; tot += 3; } ans = 0; for (int i=0; i<10; i++){ if (cnt[i]>=2){ tot -= cnt[i]/2*2; ans += cnt[i]/2; } } ans += tot/4; cout << ans << endl; return 0; }