Skip to content
UPEEC

To Roman Numerals

Easy#math#strings· solved by 0 · time limit 2.0 s

Write nn in Roman numerals (I=1, V=5, X=10, L=50, C=100, D=500, M=1000, using subtractive forms like IV, IX, XL, XC, CD, CM).

Input

A single integer nn.

Output

The Roman numeral.

Constraints

1≤n≤39991 \le n \le 3999

Sample 1

Input

1994

Output

MCMXCIV

Sample 2

Input

4

Output

IV

Sign in or join free to run and submit your solution.