def main(): L = int(input()) N = int(input()) ans = 2 ** (L - 3) * N print(ans) if __name__ == '__main__': main()