T=%w(I II III IIII V VI VII VIII IX X XI XII);x,y=gets.split;puts T[(T.index(x)+y.to_i)%12]