Roman numerals originated in Ancient Rome and were used for many centuries (up to 14th century) all across the Europe. They are still occasionally used nowadays. The numbers in traditional Roman system are represented by Latin letters I, V, X, L, C, D, and M. Each letter could only be repeated no more than 3 times in a row. It means that the maximum number that one could write was MMMCMXCIX which was equal to 3999.
To represent larger numbers several modifications of Roman systems were used. One example of those is vinculum where adding a horizontal line over a number multiplies it by 1000. Adding additional vertical lines to the left and right of the number raises multiplier to a million.
Another system was called apostrophus which originates from Etruscan numerals. In this system 500 was written as |Ɔ and 1000 as C|Ɔ. Extra Roman parentheses C and Ɔ made the number 10 times bigger.
To enter a digit with overscore type the digit followed by _ symbol. E.g. M_ will be understood as M̅. You may use usual parentheses instead of Roman. E.g. (|) instead of C|Ɔ.