The number 21987 (twenty-one thousand nine hundred eighty-seven) is written in Roman numerals as follows: XXICMLXXXVII