#include #define ll long long #define ld long double #define rep(i,a,b) for (int i = a; i < b; i++) #define irep(i,a,b) for (int i = a; i > b; i--) #define print(n) cout << n << endl #define rup(a,b) (a+b-1)/b using namespace std; int d[11]; int main(){ cout << fixed << setprecision(15); int N; cin >> N; int a,b,c; rep(i,0,N) { cin>>a>>b>>c; d[a] += 1; d[b] += 1; d[c] += 1; } int count = 0; int now = 0; int p; rep(i,1,11){ p = (int)(d[i] / 2); count += p; d[i] %= 2; now += d[i]; } count += now/4; print(count); system("pause"); return 0; }