package main import . "fmt" func main() { var n,a,b,c int Scan(&n) var t [11]int for ;n>0;n-- { Scan(&a,&b,&c) t[a]++ t[b]++ t[c]++ } for _,v:=range t[:] { n+=v/2 t[0]+=v%2 } Println(n+t[0]/4) }