In this paper, the statistical-mechanical entropies of 5D Ricci-flat black string is calculated through the wave modes of the quantum field with improved thin-layer brick-wall method. The modes along the fifth dimension are semi-classically quantized by Randall-Sundrum mass relationship. We use the two-dimensional area to describe this black strings entropy which, in the small-mass approximation, is a linear sum of the area of the black hole horizon and the cosmological horizon. The proportionality coefficients of entropy are discretized with quantized extra dimensional modes. It should be noted that the small-mass approximation used in our calculation is naturally justified by the assumption that the two branes are located far apart.