#include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; int main() { ll N; cin >> N; ll A; ll B; ll C; ll item[11] = {}; for( ll i = 0 ; i < N ; i++ ){ cin >> A; cin >> B; cin >> C; item[A]++; item[B]++; item[C]++; } ll answer = 0; ll sum = 0; for( ll j = 1 ; j <= 10 ; j++ ){ const ll& n = item[j]; answer += n / 2; sum += n % 2; } answer += sum / 4; cout << answer << endl; return 0; }