import java.io.*;
class Main {
public static void main(String[] params) {
Console c = System.console();
if ( c == null ) {
System.err.println("No console");
System.exit(1);
}
String cadena, num;
while ( !(cadena=c.readLine()).equals("") ) {
num = Integer.[b][color=#0000FF]toHexString[/color][/b](Integer.parseInt(cadena));
System.out.println("0x" + num.toUpperCase());
}
}
}