#include <iostream>
using namespace std;
int dp[51][51];
int n, r;
int DFS(int n, int r) {
if (dp[n][r] > 0) return dp[n][r];
else if (n == r || r == 0) return 1;
else return dp[n][r] = DFS(n - 1, r) + DFS(n - 1, r - 1);
}
int main() {
freopen("input.txt", "rt", stdin);
cin >> n >> r;
cout << DFS(n, r);
return 0;
}
ex)
5 3