The number 987871 (nine hundred eighty-seven thousand eight hundred seventy-one) is written in Roman numerals as follows: CMLXXXVIIDCCCLXXI