L = int(raw_input()) N = int(raw_input()) codon = raw_input().split() print 2**(L-3)*N