Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/case-rim-belgisi

Roman numeral sign

Easy 1000 ms 64 MB 21%
Share

Roman numerals use seven signs: I — $1$, V — $5$, X — $10$, L — $50$, C — $100$, D — $500$, M — $1000$. One of these signs $c$ is given. Find its value.

A Roman numeral sign and its value

Input

One capital Latin letter $c$.

Output

One integer — the value of the sign.

Note

$c$ is I, V, X, L, C, D or M

Examples

Input #1
V
Output #1
5
Input #2
M
Output #2
1000

Sign in to submit a solution

Signing up is free and takes a minute.