public class BaseHuit {
	public static void main(String[] args) {
		if (args.length == 0 || args.length >= 2) {
			System.out.println("Nombre d'arguments incorrect.");
		}
		else {
			System.out.println(Integer.toHexString(Integer.parseInt(args[0], 8)));
		}
	}
}