#include using namespace std; int qq[15]; int main(){ int n;cin>>n; for(int i=0;i>a>>b>>c; qq[a]++; qq[b]++; qq[c]++; } int s = 0; int t = 0; for(int i = 0; i < 11; i++) { s += qq[i] / 2; t += qq[i] % 2; } cout << s +(t / 4) << endl; }