#include using namespace std; int pow[32]; int main(){ pow[1] = 1; for(int i = 2; 32 > i; i++){ pow[i] = pow[i-1]*2; } int n,k;cin>>n>>k; cout << pow[max(0,n-k+1)] << endl; }