#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define MAX_MOD 1000000007 #define REP(i,n) for(int i = 0;i < n;++i) long long dp[100][100] = {}; int main() { int n, k; cin >> n >> k; long long ans = 0; dp[0][k] = 1; for (int i = 1;i < n;++i) { long long now = 0; for (int q = 1;q <= n;++q) { dp[i][q] = now; now += dp[i - 1][q]; if (k != 1||q != i) { ans += dp[i - 1][q]; } } } cout << ans << endl; }