Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 0

		for i := 0; i < 10; i++ {
			for j := 0; j < 10; j++ {
				for k := 0; k < 10; k++ {
					for l := 0; l < 10; l++ {
						if i+j+k+l == a {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,m=0;
	while(cin>>n){	
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			for(int k=0;k<=9;k++){
				for(int l=0;l<=9;l++){
					if(i+j+k+l==n) m++;
					}
				}
			}
		}
	cout<<m<<endl;
	m=0;
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std ;

int num ;
int count = 0 ;

int main()
{
	cin >> num ;

	if( num <= 36 )
	{
		for( int a = 0 ; a <= 9 ; a ++ )
		{
			for( int b = 0 ; b <= 9 ; b ++ )
			{
				for( int c = 0 ; c <= 9 ; c ++ )
				{
					for( int d = 0 ; d <= 9 ; d ++ )
					{
						if( (a+b+c+d) == num )
						{
							count ++ ;
						}
					}
				}
			}
		}
	}

	cout << count ;

	return 0 ;
}

C++: #include <iostream>

using namespace std;

int main()
{
	while (1)
	{
		int n;
		cin >> n;
		if (cin.fail()) break;

		int count = 0;

		for (int i = 0; i < 10; ++i)
		{
			for (int j = 0; j < 10; ++j)
			{
				for (int k = 0; k < 10; ++k)
				{
					for (int l = 0; l < 10; ++l)
					{
						if (i + j + k + l == n)
						{
							++count;
						}
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
	int n;
	while(cin >> n){
		if(n>36 || n<4)
			cout << 0 << endl;
		int cnt = 0;
		for(int i=0;i<10;i++){
        	for(int j=0;j<10;j++){
            	for(int k=0;k<10;k++){
                	for(int l=0;l<10;l++){
                    	if(i+j+k+l==n)
                    		cnt++;
                	}
            	}
        	}
    	}
		cout << cnt << endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main()
{
	int n;
	
	while ( scanf ("%d", &n) != EOF)
	{
		int count = 0;
		
		for (int i = 1; i <= 9; i++)
			for (int j = 1; j <= 9; j++)
				for (int k = 1; k <= 9 ; k++)
					for (int l = 1; l <= 9; l++)
						if ( (i + j + k + l) == n)
							count ++;
							
		printf ("%d\n", count);
	}

        return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int sum = 0;
    int cnt = 0;
    for (int a = 0; a < 10; ++a) {
    sum += a;
    for (int b = 0; b < 10; ++b) {
    sum += b;
    for (int c = 0; c < 10; ++c) {
    sum += c;
    for (int d = 0; d < 10; ++d) {
    sum += d;
    if (sum == n) cnt++;
    }
    }
    }
    }
    cout << cnt << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;

int main()
{
	int N;
	
	int count = 0;
	
	while(cin >> N)
	{
		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++)
					{
						int s = a + b + c + d;
						if(s == N)count++;
						else if(s > N)break;
					}
				}
			}
		}
	}
	cout << count << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>

int main(void)
{
  int n;
  
  const int minVal = 0;
  const int maxVal = 9;
  
  while (std::cin >> n) {
    int count = 0;
    for (int a = minVal; a <= maxVal; a++) {
      for (int b = minVal; b <= maxVal; b++) {
        for (int c = minVal; c <= maxVal; c++) {
          for (int d = minVal; d <= maxVal; d++) {
            if (a + b + c + d == n) {
              count++;
            }
          }
        }
      }
    }
    std::cout << count << std::endl;
  }
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int n=0;
  int C=0;
  int a,b,c,d;

  while(scanf("%d",&n)!=EOF){
C=0;
  for(a=0;a<10;a++){
	  for(b=0;b<10;b++){
		  for(c=0;c<10;c++){
			  for(d=0;d<10;d++){
				  if(a+b+c+d==n){
					  C++;
				  }
			  }
		  }
	  }
  }
  cout<<C<<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

int main(void)
{
  int n;
  int counter;
  int a, b, c, d;
  while(cin>>n){
    counter = 0;
    for(a = 1; a <= 9; a++){
      for(b = 1; b <= 9; b++){
	for(c = 1; c <= 9; c++){
	  for(d = 1; c <= 9; d++){
	    if(a+b+c+d==n){
	      counter ++;
	    }
	  }
	}
      }
    }
    cout << counter << endl;
  }
	      

  return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	int num, cou = 0;
	
	while(cin >>num){
		for(int i = 0; i < 10; i++){
			for(int j = 0; j < 10; j++){
				for(int k = 0; k < 10; k++){
					for(int l = 0; l < 10; l++){
						if((i + j + k + l) == num) cou++;
					}
				}
			}
		}
		cout <<cou<<endl;
		cou = 0;
	}
	
	return 0;
}

C++: #include<stdio.h>
#include<iostream>

int main(){
	int n,a,b,c,d,count;
	while(scanf("%d",&n)==1){
	count = 0;
	for(a=0;a<10;a++){
		for(b=0;b<10;b++){
			for(c=0;c<10;c++){
				for(d=0;d<10;d++){
					if(a+b+c+d == n) count = count + 1;
				}
			}
		}
	}
	printf("%d\n",count);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
	int n, cnt;

	while(cin >> n, n)
	{
		cnt = 0;
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				for(int k=0; k<10; k++)
				{
					for(int l=0; l<10; l++)
					{
						if(i+j+k+l == n)
						{
							cnt++;
						}
					}
				}
			}
		}

		cout << cnt << endl;
	}
}

C++: #include <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	int tmp = n-a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (tmp == c+d) {
				return true;
			}
		}
	}
	return false;
}

void solve(int n) {
	int count = 1;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) {
				count++;
			}
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main()
{
  int n;
  while (scanf("%d", &n) != EOF) {
    int cnt = 0;
    for (int a = 0; a <= 9; a++) {
      for (int b = 0; b <= min(n - a, 9); b++) {
        for (int c = 0; c <= min(n - a - b, 9); c++) {
          if (0 <= n - a - b - c && n - a - b - c <= 9) cnt++;
        }
      }
    }
    cout << cnt << endl;
  }
}

C++: #include <iostream>

using namespace std;

int main(){

	int a, b, c, d;
	int n;

	while(cin >> n){

	for(a=0; a<=9; a++){
		for(b=0; b<=9; b++){
			for(c=0; c<=9; c++){
				for(d=0; d<=9; d++){
					if(a+b+c+d == n){
						count = count +1;
					}
				}
			}
		}
	}

	cout << count <<endl;
}

	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)1e5 + 5;

signed main() {
	ll n;
	while (cin >> n) {
		int cnt = 0;
		rep(i, 10) rep(j, 10) rep(k, 10) rep(l, 10) {
			if (i + j + k + l == n) cnt++;
		}
		cout << cnt << endl;
	}
	return 0;
}