#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int dp[11][11][20000];
int main() {
	dp[0][0][0] = 1;
	rep(i, 10) {
		for (int j = 0; j <= 10; j++) {
			for (int k = 0; k <= 10000; k++) {
				dp[i + 1][j][k] += dp[i][j][k];
				dp[i + 1][j + 1][k + i] += dp[i][j][k];
			}
		}
	}
	int n, s;
	while (~scanf("%d%d", &n, &s)) {
		printf("%d\n", dp[10][n][s]);
	}
}