#include using namespace std; int main(){ int box[15] = {0}; int n; cin >> n; for(int i = 0; i < n; ++i){ int a, b, c; cin >> a >> b >> c; ++box[a]; ++box[b]; ++box[c]; } int sum = 0; for(int i = 1; i <= 10; ++i){ sum += box[i] / 2; box[i] %= 2; } int t_sum = 0; for(int i = 1; i <= 10; ++i){ t_sum += box[i]; } sum += t_sum / 4; cout << sum << endl; return 0; }