The number 36871 (thirty-six thousand eight hundred seventy-one) is written in Roman numerals as follows: XXXVIDCCCLXXI