On the statistical mechanics approach in the random matrix theory: Integrated density of states