#include <iostream>

using namespace std;
int countSolve(int a,int b,int n);
int solve(int n);

int main() {
	int n,i=0;
	int a[3];
	while (1) {
		cin >> n ;
		a[i] = solve(n);
		i++;

		if(i == 2) break ;
	}

	for(i=0;i<2;i++){
		cout << a[i] << endl;
	}

	return 0;
}

int countSolve(int a, int b, int n) {
	int x = n-a-b;
	int count = 0, i = 0 , j=0;
	for (i=0; i<10; i++) {
		for (j=0; j<10; j++) {
			if (x == i+j)
				count++;
		}
	 }
	return count;
}

int solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += countSolve(a,b,n);
		}
	}
	return count ;
}