#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>

using namespace std;

int main() {

	int n, i, j, k, l,count=0;

	while (cin >> n,n) {
		for (i = 0; i < 10; i++) {
			for (j = 0; j < 10; j++) {
				for (k = 0; k < 10; k++) {
					for (l = 0; l < 10; l++) {
						if (i + j + k + l == n)
							count++;
					}
				}
			}
		}
		cout << count << endl;
		count = 0;
	}

	return 0;
}