#include int N, a, b, c, x, y, i = 11, I[11]; int main() { std::cin >> N; while (N-- && std::cin >> a >> b >> c) I[a]++, I[b]++, I[c]++; while (i--) x += I[i] / 2, y += I[i] % 2; std::cout << x + y / 4 << "\n"; }