#include <iostream>

using namespace std;

int main()
{
	int n;
	while ( cin >> n ) {
		int count;
		if (n>36) count = 0;
		else if (n<=9) count = ((n+1)*(n+2)*(n+3))/6;
		else if (n<=18) count = 5*n*n - 3*n - 158;
		// ((n+1)*(n+2)*(n+3))/6 - ((n-10+1)*(n-10+2)*(n-10+3))/6 + 27 * (n-9)
		else if (n<=27) count = 5*(36-n)*(36-n) - 3*(36-n) - 158;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}