#include #include #include #include #include using namespace std; int main() { int n, a; int item[11] = {}; cin >> n; for (int i = 0; i < 3 * n; i++) { cin >> a; item[a]++; } int count = 0; int rest = 0; for (int i = 1; i <= 10; i++) { count += item[i] / 2; rest += item[i] % 2; } count += rest / 4; cout << count << endl; return 0; }