import sys input=lambda: sys.stdin.readline().rstrip() l=int(input()) n=int(input()) print(2**(l-3)*n)