import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int length = sc.nextInt(); int n = sc.nextInt(); System.out.println(pow(2, length - 3) * n); } static long pow(long n, long p) { if (p == 0) { return 1; } else if (p % 2 == 0) { return pow(n * n, p / 2); } else { return n * pow(n, p - 1); } } }