#include #include using namespace std; int main() { int N; cin >> N; vector v(11); for (int i = 0; i < N; i++) { int a, b, c; cin >> a >> b >> c; v[a]++; v[b]++; v[c]++; } int res = 0; int ans = 0; for (int i = 1; i < 11; i++) { ans += v[i] / 2; res += v[i] % 2; } ans += res % 4; cout << res << endl; }