import sys line1 = sys.stdin.readline() dic = {'0':0, '1':1,'2':2,'3':3,'4':4,'5':5,'6':6, '7':7,'8':8,'9':9,'10':10, 'A':10,'B':11, 'C':12,'D':13,'E':14,'F':15} line1 = line1[::-1] line1 = line1[:-2] line1 = list(line1.strip()) acc = 0 n = 0 for i in line1: #print(dic.get(i),n) in...