Since there is no external force acting on the system during collision, the linear moment of bullet+block system will be conserved.
Initial momentum of block=

Final momemntum of block after its speed gets reduced to half=

The reduction of momentum will be imparted by the incoming bullets in the direction opposite to that of the block. Let the number of bullets be

.
Hence

