import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNextLine()){ String s=sc.nextLine(); String s1=s.substring(2,s.length()); int ans=0; for(int i=0;i<s1.length();i++){ double power=Math.pow(16,(s1.length()-i-1)); if(s1.c...