import java.util.Scanner import scala.collection.mutable.ListBuffer object no29{ def main(args:Array[String]):Unit={ val scan:Scanner = new Scanner(System.in) val list:ListBuffer[Int] = ListBuffer.fill(10)(0) val n:Int = scan.nextInt for(i <- 1 to 3*n){ list(scan.nextInt-1)+=1 } var res:Int = 0 for(i <- 1 to 10){ res += list(i-1)/2 list(i-1) %= 2 } println(res+list.sum/4) } }