#include #include #include #include using namespace std; int main() { int N, a, b, c, ans = 0, item[11] = { 0 }; cin >> N; for (int i = 0; i < N; ++i) { cin >> a >> b >> c; ++item[a]; ++item[b]; ++item[c]; } int temp = 0; for (int i = 1; i <= 10; ++i) { ans += item[i]/2; temp += item[i] & 1; } ans += temp / 4; cout << ans << endl; return 0; }