On a problem of Chebyshev and Markov