#include <iostream>

using namespace std;

int answer;

void saiki( int n, int s , int min )
{
	if( s == 0 && n == 0 ){ answer++; return; }
	else if( n == 0 || s < 0 ) return;
	for( int i = min;i <= 9;i++ ){
		saiki( n - 1, s - i, i );
	}
}
int main(int argc, char const* argv[])
{
	int n,s;

	while( cin >> n >> s ){
		answer = 0;
		saiki( n, s ,1);
		cout << answer << endl;

	}
}