#include <iostream>
#define rep(i,a) for(int i=0;i<a;++i)

using namespace std;

int main(void)
{
	int n;
	int a[4];
	while(cin >> n,n)
	{
		int count = 0;
		rep(i,10)
		{
			rep(j,10)
			{
				rep(c,10)
				{
					rep(d,10)
					{
						if(i+j+c+d == n)
							++count;
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}