The number 29871 (twenty-nine thousand eight hundred seventy-one) is written in Roman numerals as follows: XXIXDCCCLXXI