The number 838987 (eight hundred thirty-eight thousand nine hundred eighty-seven) is written in Roman numerals as follows: DCCCXXXVIIICMLXXXVII