using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { string[] roma = { "XII", "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI" }; string[] s = Console.ReadLine().Split(); int t = int.Parse(s[1]); int su = 0; for (int i = 0; i < 12; i++) { if (s[0] == roma[i]) { su = i; break; } } su = (su + t) % 12; if (su < 0) { su += 12; } Console.WriteLine(roma[su]); Console.Read(); } }