#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pl; ll C[30][30]; void comb_table(ll N) { for (ll i = 0; i <= N; i++) { for (ll j = 0; j <= i; j++) { if (j == 0 || j == i) { C[i][j] = 1LL; } else { C[i][j] = C[i - 1][j - 1] + C[i - 1][j]; } } } } int main() { int N, K; cin >> N >> K; comb_table(N); ll ans = 0; for (int i = 0; i <= N - K; i++) { ans += C[N - K][i]; } cout << ans << endl; return 0; }