fun main(args: Array) { val N = readLine()!!.toInt() val dic = mutableSetOf() var cnt = 0 for (i in 0 until N) { val abc = readLine()!!.split(" ").map { it.toInt() } abc.forEach { v -> if (v !in dic) { dic.add(v) } else { cnt += 1 dic.remove(v) } } } cnt += dic.size / 4 println(cnt) }