#include using namespace std; #define NUM 11 int main(void){ int N; cin >> N; int a, b, c, cnt = 0; int dp[NUM], sub = 0; dp[0] = 0; for(int i = 1; i < 11; i++){ dp[i] = 0; } for(int i = 0; i < N; i++){ cin >> a >> b >> c; dp[a]++; dp[b]++; dp[c]++; } for(int i = 1; i < 11; i++){ cnt += dp[i] / 2; sub += dp[i] % 2; if(sub / 4 == 1) { cnt++; sub = 0; } } cout << cnt << endl; return 0; }