#include using namespace std; string t[12] = {"XII","I","II","III","IIII","V","VI","VII","VIII","IX","X","XI"}; int main(){ string s;cin>>s; int ti; for(int i = 0; 12 > i; i++){ if(t[i] == s){ ti = i; break; } } int z;cin>>z; z = ((z+2400)%12); ti = ((ti+z)%12); cout << t[ti] << endl; }