Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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 <math.h>
#include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
struct omt{omt(){ios::sync_with_stdio(false);cin.tie(0);}}star;

bool binary_search(int x, vector<int> A){
    int l = 0, r = 10, mid;
    while(l < r){
        mid = (l + r) / 2;
        if(x == A[mid]) return true;
        else if(x < A[mid]) r = mid;
        else if(A[mid] < x) l = mid + 1;
    }
    return false;
}

int main(){
    vector<int> A;
    REP(i, 10) A.push_back(i);

    int n;
    while(cin >> n){
        int cnt = 0;
        REP(i, 10){
            REP(j, 10){
                REP(k, 10){
                    int hoge = n - (i + j + k);
                    if(binary_search(hoge, A)) cnt++;
                }
            }
        }
        cout << cnt << endl;
    }


    return 0;
}

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

int main() {
  int n, cnt;
  while (scanf("%d", &n) == 1) {
    cnt = 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) {
              cnt++;
            }
          }
        }
      }
    }

    printf("%d\n", cnt);
  }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

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


  }
    
}

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

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf("%d", &val) != EOF)
	{
		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 == val)count++;

					}

				}


			}


		}

		printf("%d\n", count);
		count = 0;

	}

}

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

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

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

using namespace std;

int main() {
	int num[4], n;
	int count = 9;
	int point[10] = {0};

	cin >> n;

	for(int i = 0; i < 4; i++) {
		if(n - count >= 0) {
			n -= count;
			num[i] = count;
		}
		else {
			count--;
			i--;
		}
	}


	for(int i = 0; i < 4; i++) {
		point[num[i]]++;
	}

	int p = 0;

	for(int i = 0; i < 10; i++) {
		p = max(p, point[i]);
	}


	int ans = 1;

	if(p == 4) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
	}
	else if(p == 3) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 6;
	}
	else if(p == 2) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 2;
	}
	else if(p == 1) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= ans;
	}

	cout << ans << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

int n;

int recur(int num, int dep) {
	int ret = 0;

	if (dep == 0) {
		if (num == 0) return 1;
		else return 0;
	}
	for (int i = 0; i < 10 && i <= num; i++) {
		ret += recur(num - i, dep - 1);
	}

	return ret;
}

int main() {
	n = -1;
	cin >> n;

	while (n != -1) {
		cout << recur(n, 4) << endl;
		
		n = -1;
		cin >> n;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include <iostream>
using namespace std;
int main(void){
    int a, b, c, d, n, count;
    while(cin >> n){
        count = 0;
        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++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

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

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

C++: #include <stdio.h>

int main(void)
{
	int n;
	int a,b,c,d;
	int count;
	
	while (scanf("%d", &n) == 1){
		
		count = 0;
		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++;
						}
					}
				}
			}
		}
		printf("%d\n", count);
	}
	
	
	
	return (0);
}

C++: #include <iostream>

#define rep(i, n) for(int i = 0; i <= n; i ++)

using namespace std;

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

C++: #include<stdio.h>
int main(void)
{
	int i,j,k,l;
	int cnt;
	int n;

	while(scanf("%d",&n)!=EOF){
		cnt=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==n){
							cnt++;
						}
					}
				}
			}
		}
		printf("%d\n",cnt);
	}
	return 0;
}

C++: #include<iostream>
int n, count = 0;

void f(int, int, int, int);
int main()
{
	/*
	int i,array[SIZE], sum = 0;
	for (i = 0; i < SIZE; i++)
	{
		array[i] = (i + 1) * 10;
		printf("%d???????????????:%d\n", (i + 1), array[i]);
		sum += array[i];
	}
	printf("%d\n", sum);
	return 0;
	
	*/
	/*
	double debt = 100000,add,n,p = 0.05;
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		add = (double)(int)(((debt * 0.05)/1000)+0.999)*1000;
		debt += add;
	}
	std::cout << debt;
	*/
	/*
	int num[SIZE],i;
	for (i = 0; i < SIZE;i++)
		scanf("%d", &num[i]);
	for (i = 1; i <= SIZE; i++)
		printf("%d\n", num[SIZE - i]);
		*/
	
	std::cin >> n;
	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++)
					f(a, b, c, d);

	std::cout << count<< std::endl;
	return 0;
}

void f(int a, int b, int c, int d)
{
	if (a + b + c + d == n)
	{
		count++;
	}
}