#include #include int main(void) { char s[][5]={"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"},t[5]; int n,i,a; scanf("%s%d",t,&n); for(i=0;strcmp(s[i],t);i++); if(n==0)a=i; else if(i+n>0)a=(i+n)%12; else a=12+(i+n)%12; puts(s[a]); return 0; }