#K82582. Integer to Roman Numeral Conversion

    ID: 36007 Type: Default 1000ms 256MiB

Integer to Roman Numeral Conversion

Integer to Roman Numeral Conversion

Given an integer N ($1 \le N \le 3999$), convert it to its corresponding Roman numeral. Roman numerals are represented by the following symbols:

$I=1$, $V=5$, $X=10$, $L=50$, $C=100$, $D=500$, $M=1000$.

The numeral is constructed by combining the symbols and making use of subtractive notation. For example, 4 is represented as "IV" (i.e., 5 - 1) rather than "IIII", and 9 is represented as "IX".

Your task is to read an integer from standard input and output its Roman numeral representation to standard output.

inputFormat

The input consists of a single integer N on a single line, where $1 \le N \le 3999$.

stdin:
1994

outputFormat

Output the Roman numeral representation of the input integer on a single line.

stdout:
MCMXCIV
## sample
1
I