include
using namespace std;
int main()
{int n;
cin >> n;
switch(n)
{case 1:cout<<"I";break;</p>
case 5:cout<<"V";break;</p>
case 10:cout<<"X";break;</p>
case 50:cout<<"L";break;</p>
case 100:cout<<"<span>C";break;
case 500:cout<<"D";break;</p>
case 1000:cout<<"M";break;</p>
}
return 0;
}