$$_=$i++for@a=<{I,V}{,II}{,I} IX X{,I,II}>;<>=~$";print$a[(${$`}+$')%12]