$"='|';s/@{[%_=split'(\d+)',IV4IX9XL40XC90CD400CM900I1V5X10L50C100D500M1000]}/+$_{$&}/g,print eval,$/for<>