The number 12987 (twelve thousand nine hundred eighty-seven) is written in Roman numerals as follows: XIICMLXXXVII