Time

16:09:23
22 May 2012
Version for print

Roman numerals

   Count the sum of two natural numbers À and Â, which have written in roman system of numeration. The answer you must write too in roman system of numeration.

   Ì = 1000, D = 500, Ñ = 100, L = 50, X = 10, V = 5, I = 1 (all numbers is less 2000).


Specifications

   Input

   In line wrote two number of roman system numeration, between which stand mark "+".

   Output

   One number, sum of numbers is roman system numeration too. Numbers in roman system numeration wrote big Latin letters.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 33% 338/503
Classes: Calculation system

Example

Example input

VII+II

Example output

IX


← The vouchers Problems Matches →