using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(); int n = int.Parse(s[1]); string[] su = new string[] { "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" }; int m = Array.IndexOf(su, s[0]); if (n < 0) { while (n < 0) { n += su.Length; } } m += n; if (su.Length < m) { m -= su.Length; } Console.WriteLine(su[m]); Console.Read(); } }