integer::N,i,up=0,res=0 integer::drop(300),item(10)=0 read *, N read *, drop(1:3*N) do i=1, 3*N item(drop(i)) = item(drop(i)) + 1 end do do i=1,10 up = up + item(i)/2 res = res + MOD(item(i),2) end do print '(i0)', up + res/4 end program