a = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"] s, t = map(int, input().split()) i = int(s) i = (i+int(t)) % 12 print(a[i])