#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() int main(){ string num[]={"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"}; int time=0; { string temp;cin>>temp; REP(i,12){ if(temp==num[i]){ time=i+1; break; } } } int t;cin>>t; time+=t; cout<=0?time%12:time%12+12)-1]<