import java.util.Scanner; public class Main_yukicoder175 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int n = sc.nextInt(); int ret = 1; for (int i = 0; i < l - 3; i++) { ret *= 2; } System.out.println(ret * n); sc.close(); } }