Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include <iostream>

int main(void)
{
    int n;

    while(std::cin >> n)
    {
        int result = 0;
        
        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)
                    {
                        result += (a + b + c + d == n);
                    }
                }
            }
        }
        
        std::cout << result << std::endl;
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int aaa;
    while (cin >> aaa) {
        int cnt = 0;
        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 == aaa) {
                            cnt++;
                        }
                    }
                }
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

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

int n;
int a[4];

// 問題文のa,b,c,dをa[0],a[1],a[2],a[3]とする
// kが4なら、a[0]+a[1]+a[2]+a[3]==nかどうかを調べて
// 満たしていたら1を返す。そうでなければ0。
// もしkが3以下ならa[k]を0から9まで調べてsaiki(k+1)を呼び出す。
// それらから返ってくる値の合計が、
// a[k-1]までを固定し、a[k]以降を0から9まで動かした時の
// 場合の数となるので、これをreturnする。
int saiki(int k){
	if(k==4){
		if(a[0]+a[1]+a[2]+a[3]==n){
			return 1;
		}else{
			return 0;
		}
	}else{
		int sum = 0;
		for(int i=0; i<10; i++){
			a[k] = i;
			sum += saiki(k+1);
		}
		return sum;
	}
}

int main(){
	for(;;){
		if(cin >> n){  // 入力が終わったらelse側にまわる
			cout << saiki(0) << endl;
		}else{
			break;
		}
	}

	return 0;
}

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

int main(){
//old
		/* 2014 ??????1
		int a[2],ans;
		cin >> a[0] >> a[1];
		ans = a[0] * a[1];
		cout << ans << endl;
		*/
		/* 2014 ??????2
		int a[6],ans = 0;
		cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> a[5];
		if(a[0] + a[1] * 5 + a[2] * 10 + a[3] * 50 + a[4] * 100 + a[5] * 500 >= 1000) ans = 1;
		cout << ans << endl;
		*/
		/* 2014 ??????3
		int a,i = 0;
		cin >> a;
		int b[a],c[a],ans[a];
		while(a > i){
			cin >> b[i] >> c[i];
			ans[i] =  b[i] % c[i];
			if(ans[i] == 0) ans[i] = c[i];
			i++;
		}
		i = 0;
		while(a > i){
		cout << ans[i] << endl;
		i++;
		}
		*/
		/* 2014 ??????4
		int a[2],i = 1;
		cin >> a[0];
		int n[a[0]],m[a[0]];
		while (a[0] >= i){
			cin >> n[i] >> m[i];
			i++;
		}
		i = 1;
		cin >> a[1];
		int o[a[1]],p[a[1]];
		while (a[1] >= i){
			cin >> o[i] >> p[i];
			i++;
		}
		i = 1;
		int ii,c,aa;
		aa = a[0] + a[1];
		int ans[aa][2],hh[aa],mm[aa],chk,count = 1;
		while(aa >= i){
			ii = 1;
			chk = 1;
			if(a[0] >= i){
				while(i - 1 >= ii){
					if(n[i] == hh[ii] and m[i] == mm[ii]){
						chk = 0;
					}
					ii++;
				}
				if(chk == 1){ 
					hh[count] = n[i];
					mm[count] = m[i];
					count++;
				}
			}else{
				while(i - 1 >= ii){
					if(o[i - a[0]] == hh[ii] and p[i - a[0]] == mm[ii]){
						chk = 0;
					}
					ii++;
				}
				if(chk == 1){ 
					hh[count] = o[i - a[0]];
					mm[count] = p[i - a[0]];
					count++;
				}		

			}
			i++;
		}
		aa = count - 1;
		i = 1;
		while(aa >= i){
			ii = 1;
			c = 1;
				while(aa >= ii){
						if(hh[i] > hh[ii] or hh[i] == hh[ii] and mm[i] > mm[ii] and i != ii){
							c++;
						}
				ii++;
				}
			ans[c][0] = hh[i];
			ans[c][1] = mm[i];
		 i++;
		}
		i = 1;
		while(aa >= i){
			if(aa == i){
				if(ans[i][1] < 10){
					cout << ans[i][0] << ":" << "0" << ans[i][1] << endl;;
				}else{
					cout << ans[i][0] << ":" << ans[i][1] << endl;;
				}

			}else{
				if(ans[i][1] < 10){
					cout << ans[i][0] << ":" << "0" << ans[i][1] << " ";
				}else{
					cout << ans[i][0] << ":" << ans[i][1] << " ";
				}
			}
			i++;
		}
		//????????°???
		int n,i,ans = 100000,a,risi[2];
		cin >> n;
		for(i = 1;n >= i;i++){
			risi[0] =  ans * 0.05;
			risi[1] = risi[0];
			while(risi[1] >= 1000){risi[1] = risi[1] - 1000;}
				if(risi[1] > 0){risi[0] = risi[0] - risi[1] + 1000;}
			ans = ans + risi[0];
		}
		cout << ans << endl;
		*/
//old

	int in,i[4];
	while(cin >> in){
	int ans = 0;
	for(i[0] = 0;9 >= i[0];i[0]++){
		//if(0 > in - i[0]) break;
		//cout << "[1]" <<  i[0] << endl;				
		for(i[1] = 0;9 >= i[1];i[1]++){
			//if(0 > in - ( i[0] + i[1] ) ) break;
			//cout << "[2]" << i[1] << endl;
			for(i[2] = 0;9 >= i[2];i[2]++){
				//if(0 > in - ( i[0] + i[1] + i[2] ) ) break;
				//cout << "[3]" << i[2] << endl;
				for(i[3] = 0;9 >= i[3];i[3]++){
					//if(0 > in - ( i[0] + i[1] + i[2] + i[3] ) ) break;
					//cout << "[4]" << i[3] << endl;
					//cout << "[1] " << i[0] << "  [2] " << i[1] << "  [3] " << i[2] << "  [4] " << i[3] << endl; 
					if(i[0] + i[1] + i[2] + i[3] == in){
					//cout << "[1] " << i[0] << "  [2] " << i[1] << "  [3] " << i[2] << "  [4] " << i[3] << endl; 
					ans++;
					}
				}	
			}
		}
	}
	cout << ans << endl;	
	}

	/*int in;
	cin >> in;
	int a[in];
	for(int i = 1;in >= i;i++){
		cout << "[IN] [" << i << "] ";
		cin >> a[i];
	}
	for(int i = 1;in >= i;i++){cout << "[OUT] ["<< i << "] " <<  a[i] << endl;}*/
}

C++: #include<stdio.h>
int n;
int i,j,h,w;
int main(void){
	while(scanf("%d",&n)!=EOF){
		int cnt=0;
		for(i=0;i<=9;i++){
			for(j=0;j<=9;j++){
				for(h=0;h<=9;h++){
					for(w=0;w<=9;w++){
						if(n==i+j+h+w){
							cnt++;
						}
					}
				}
			}
		}
		printf("%d\n",cnt);
	}
	return 0;
}

C++: #include <iostream>

int main()
{
    int n;
    while(std::cin >> n) {
        int ans = 0;
        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++) {
                        if(a + b + c + d == n) {
                            ans++;
                        }
                    }
                }
            }
        }
        std::cout << ans << std::endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <iostream>

using namespace std;

int main() {
	int n;
	while (scanf("%d", &n) != EOF) {
		if (n > 36) printf ("0\n");
		else {
			int tmp;
			int ans = 0;
			for (int i=0; i<10; ++i) {
				for (int j=0; j<10; ++j) {
					for (int k=0; k<10; ++k) {
						tmp = n - i - j - k;	
						if (tmp >= 0 && tmp < 10) ++ans;
					}
				}
			}
			printf ("%d\n", ans);
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int ans = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
	for(int k=0; k<10; k++)
	  if(n-i-j-k>=0 && n-i-j-k<=9) ans++;
    cout <<ans<<endl;
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
#include<string>
typedef long long int ll;


using namespace std;

int main(){
	while(1){
		int n;
		ll sum=0;
		if( !(cin>>n) )break;
		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 )sum++;
					}
				}
			}
		}
		cout<<sum<<endl;
	}
	return 0;
}

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

int main(){
  int n;
  for(;cin >> n;){
    int ans = 0;
    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++){
	    if(a+b+c+d == n)ans++;
	  }
	}
      }
    }
    cout << ans << endl;
  }
}