import java.util.*;
public class Transfer {
public static void main(String[]args){
Scanner input=new Scanner(System.in);
String hex=input.nextLine();
System.out.println("hex:"+hex.toUpperCase());
System.out.println("Decimal:"+hexToDecimal(hex.toUpperCase()));
// char c='0';
// System.out.println(hexCharToDecimal(c));
}
public static int hexToDecimal(String hex)
{
public class Transfer {
public static void main(String[]args){
Scanner input=new Scanner(System.in);
String hex=input.nextLine();
System.out.println("hex:"+hex.toUpperCase());
System.out.println("Decimal:"+hexToDecimal(hex.toUpperCase()));
// char c='0';
// System.out.println(hexCharToDecimal(c));
}
public static int hexToDecimal(String hex)
{