main=do t<-tail.map read.words<$>getContents let s=[sum[1|b<-t,a==b]|a<-[1..10]] print$div(length[a|a<-s,odd a])4+(sum[a`div`2|a<-s])