The number 2871 (two thousand eight hundred seventy-one) is written in Roman numerals as follows: MMDCCCLXXI