import java.util.Scanner; public class No175 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int l = s.nextInt() , n = s.nextInt(); s.close(); System.out.println((int)Math.pow(2, l-3) * n); } }