l = int(input()) n = int(input()) print(n<<(l-3))