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

int n;
int ans;

int main(void)
{
	int d[4][61] = {};

		for(int i = 0; i <= 9; i++)
			d[0][i]++;
		for(int i = 0; i < 3; i++){
			for(int j = 0; j <= 9; j++){
				for(int k = 0; k <= 50; k++){
					d[i+1][k+j] += d[i][k];
				}
			}
		}


	while(cin >> n, n){
		ans = 0;
	
		ans = d[3][n];
		cout << ans << endl;
	}


	return 0;
}