length = input() codon = input() print 2 ** (length - 3) * codon