#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; int main() { int N, a, b, c; cin >> N; vector v(11); rep(i, 0, N) { cin >> a >> b >> c; v[a]++, v[b]++, v[c]++; } int ans = 0, cnt = 0; for (auto n : v) { ans += n / 2; cnt += n % 2; } ans += cnt / 4; cout << ans << endl; getchar(); }