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