The number 24871 (twenty-four thousand eight hundred seventy-one) is written in Roman numerals as follows: XXIVDCCCLXXI