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