/** * yukicoder no.29 * @author scache */ object Main{ def main(args: Array[String]){ val sc = new java.util.Scanner(System.in) val n = sc.nextInt val items = List.fill(n*3)(sc.nextInt) val a = (for(item <- items.distinct) yield { items.filter(_==item).length/2 }).sum println((items.length-a*2)/4 + a) } }