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