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