local s_1, t = io.read():match("(%a+) (%-?%d+)"); do t = tonumber(t) end local corr = {}; do corr["I"] = 1 corr["II"] = 2 corr["III"] = 3 corr["IIII"] = 4 corr["V"] = 5 corr["VI"] = 6 corr["VII"] = 7 corr["VIII"] = 8 corr["IX"] = 9 corr["X"] = 10 corr["XI"] = 11 corr["XII"] = 12 end local ans = (function () local num = (corr[s_1] + t) % 12 for key, value in pairs(corr) do if value == num then return key end end end)() print(ans)