#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <map>

using namespace std;

int memo[100] = {0};

int main() {
	map<int, bool> m;
	for (int a = 0; a < 10; ++a)
		for (int b = 0; b < 10; ++b)
			for (int c = 0; c < 10; ++c)
				for (int d = 0; d < 10; ++d) {
					vector<int> v;

					v.push_back(a);
					v.push_back(b);
					v.push_back(c);
					v.push_back(d);

					sort( v.begin(), v.end() );

					int code = 0;
					for (int i = 0, k = 1; i < v.size(); ++i, k *= 10)
						code += v[i] * k;

					if ( !m[code] ) ++memo[a+b+c+d];
					else m[code] = true;
				}

	int n;
	while (scanf("%d", &n) != EOF) {
		cout << memo[n] << endl;
	}
}