import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int K = scan.nextInt(); scan.close(); int ans; if(K == 1) { ans = (int)Math.pow(2, N - K) - N; }else { ans = (int)Math.pow(2, N - K); } System.out.println(ans); } }