#include using namespace std; int main(void) { int n, k; cin >> n >> k; int a = 1 << k; int b = 1 << n; int x = a; int ans = 0; if (b >= a) ans = (b - a) / a + 1; cout << ans << endl; return 0; }