#include //cin, cout #include //vector #include //sort,min,max #include //string #include //fixed #include //setprecision #include //swap using namespace std; int main() { int N; cin >> N; vector A(11); int temp; for (int i = 0; i < N; i++) { for (int j = 0; j < 3; j++) { cin >> temp; A[temp]++; } } int ans = 0; temp = 0; for (int i = 1; i < 11; i++) { ans += A[i] / 2; temp += A[i] % 2; } ans += temp / 4; cout << ans << endl; return 0; }