import scala.math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val n = sc.nextInt val xs = new Array[Int](11) for (i <- 0 to n-1) { val a, b, c = sc.nextInt xs(a) += 1 xs(b) += 1 xs(c) += 1 } val div = (1 to 10).map { e => xs(e) / 2 }.sum val mod = (1 to 10).map { e => xs(e) % 2 }.sum val ans = div + (mod / 4) println(ans) } }