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