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