using System; namespace app{ class MyClass{ static void Main(){ var t=new string[]{"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"}; var s =Console.ReadLine().Split(); var now=Array.IndexOf(t,s[0])+1; var answer=(now + int.Parse(s[1])%13)%13; Console.WriteLine(t[answer-1]); } } }