#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;

int n;
int ans;


void saiki(int x, int c)
{
	if(x == 0 && c == 5)
		ans++;

	for(int i = 9; i >= 0; i--){
		if(x - i >= 0 && c <= 4)
			saiki(x-i,c+1);
	}

}

int main(void)
{

	int d[20];

	int c = 0;


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


	return 0;
}