The number 27871 (twenty-seven thousand eight hundred seventy-one) is written in Roman numerals as follows: XXVIIDCCCLXXI