#include <iostream>
#include <string>
using namespace std;
char DecToHex (unsigned int n)
{
char hex[] = {'0', '1', '2', '3','4','5'
,'6','7','8','9','a','b','c'
,'d','e','f'
};
return hex[n] ;
}
class Solution
{
public :
string toHex (int num )
{
unsigned int unNum = (int) num ;
string result ;
do
{
result = DecToHex(unNum % 16) + result ;
unNum /= 16 ;
} while (unNum>0);
return result ;
}
};
int main()
{
Solution Test ;
int n ;
string strNumber ;
while (cin>>n)
{
strNumber = Test.toHex(n) ;
cout << "Decimal ( " << n <<" ) to Hexadecimal is : " << strNumber << endl ;
}
}