Effect of the multiple Compton scatterings on an x-ray emission spectrum. Calculation by the Monte Carlo method