#include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //using namespace atcoder; using namespace std; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) using Graph = vector>>>; int main() { ll N; cin >> N; vll D(11, 0); rep(i, N) { rep(k, 3) { ll A; cin >> A; D[A]++; } } ll an = 0; ll p = 0; rep(i, 11) { an += D[i] / 2; if (D[i] % 2 != 0)p++; } cout << an + p / 4 << endl; }