The number 31804 (thirty-one thousand eight hundred four) is written in Roman numerals as follows: XXXIDCCCIV