#include <iostream>
using namespace std;

int main(void)
{
	int num, total, ans, tmp,cc[11];

	while (cin >> num) {
		ans = 0;
		tmp = num;
		for (int j = 9; j >= 0; j--) {
			int C[11] = {0};
			C[10] = 4;
			num = tmp;
			for (int i = j; i > 0 && C[10] > 0; i--) {
				while (num-i >= 0) {
					C[10]--;
					C[i]++;
					num -= i;
				}
			}
			total = 0;
			if (num == 0) {
				total = 24;
				bool flag = true;
				for (int i = 0; i < 11; i++) 
					if (cc[i] != C[i]) flag = false;
				if (flag) total = 0;

				for (int i = 0; i < 11; i++) {
					cc[i] = C[i];
					while (C[i] > 0) {
						total /= C[i];
						C[i]--;
					}
				}
			}
			ans += total;
		}
		
		cout << ans << endl;
	}
	
	return 0;
}