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 <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;

int main(){
	int in,i[4],ans = 0,s[4] = {0,0,0,0};
	cin >> in;
	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;
					if(i[0] + i[1] + i[2] + i[3] == in){ans++;}
				}	
			}
		}
	}
	cout << ans << endl;
}

C++: #include<iostream>

using namespace std;

int count( int i, int n )
{
  if ( i == 4 )
    if ( n == 0 )
      return 1;
    else
      return 0;
  else
    {
      if ( n < 0 ) return 0;
      
      int ret = 0;
      for ( int j = 0; j < 10; j++ )
        {
          ret += count( i+1, n - j );
        }
      return ret;
    }
}

int main()
{
  int n;
  
  while ( cin >> n )
    cout << count(0, n) << endl;

  return 0;
}

C++: #include <iostream>
#include <vector>
 
int main(void) {
  int n;
  while (std::cin >> n) {
    int ans = 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 == n)ans++;
          }
        }
      }
    }
    std::cout << ans << std::endl;
  }
  return 0;
}

C++: #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 ;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int ans=0;
int n;
class Sumof4Integers{
    public:
        void solve(){ 
            dfs(0,0);
            printf("%d\n",ans);
        }
        void dfs(int d,int sum){ 
            if(d==4){
                if(n==sum)ans++;
                return;
            }
            for(int i=0;i<10;i++){
                dfs(d+1,sum+i);
            }
        }
};
int main(){ 
    Sumof4Integers inst;
    while(cin>>n){
        inst.solve();
        ans=0;
    }
}

C++: #include<iostream>

using namespace std;

int main(){
    int n,result=0;
    cin >> n;
    for (int a = 0; a <= 9; a++){
        for (int b = a; b <= 9; b++){
            for (int c = b; c <= 9; c++){
                for (int d = c; d <= 9; d++){
                    if (a + b + c + d == n)
                    {
                        result++;
                    }
                }
            }
        }
    }

    cout << result / 4 << endl;

    return 0;
}

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

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

C++: //#define _GRIBCXX_DEBUG
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;


// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion


// Effective std
#pragma region ESTD
template<typename C, typename T>
constexpr int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F>
constexpr int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T, typename U>
constexpr void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U>
constexpr void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C>
constexpr void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred>
constexpr void sort(C& c, Pred p) { sort(ALL(c), p); }
template<typename C>
constexpr void reverse(C& c) { reverse(ALL(c)); }
#pragma endregion


// ?´???°
#pragma region PRIME
bool is_prime(unsigned n) {
  switch(n) {
    case 0:
    case 1: return false;
    case 2: return true;
  }
  if (n%2==0) return false;
  for (unsigned i=3; i*i<=n; i+=2)
    if (n%i==0) return false;
  return true;
}
#pragma endregion


// ??§??????/?°?????????????
#pragma region TRANSFORM
void mutal_tr(string &s) {
  for(int i=s.size(); i--;) {
    if(islower(s[i])) s[i] = toupper(s[i]);
    else if (isupper(s[i])) s[i] = tolower(s[i]);
  }
}
void to_upper(string &s) { for(int i=s.size(); i--;) s[i] = toupper(s[i]); }
void to_lower(string &s) { for(int i=s.size(); i--;) s[i] = tolower(s[i]); }
#pragma endregion


// ??????
#pragma region SET
template<class T>
set<T> intersection(const set<T>& sa, const set<T>& sb) {
  set<T> ret;
  for(T a : sa) if(sb.find(a) != sb.end()) ret.insert(a);
  return ret;
}
#pragma endregion

// Union Find
#pragma region UF
struct UnionFind {
  vector<int> data;
  UnionFind(int size) : data(size, -1) {}
  bool union_set(int x, int y) {
    x = root(x); y = root(y);
    if(x!=y) {
      if(data[y] < data[x]) swap(x, y);
      data[x] += data[y]; data[y] = x;
    }
    return x != y;
  }
  bool find_set(int x, int y) { return root(x) == root(y); }
  int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); }
  int size(int x) { return -data[root(x)]; }
};
#pragma endregion


// ?????°
#pragma region CONST_VAL
#define PI (2*acos(0.0))
#define EPS (1e-9)
#define MOD (int)(1e9+7)
#pragma endregion

int main()
{
    int n;
    while(cin>>n) {
        int ans = 0;
        rep(i,10) rep(j,10) rep(k,10) rep(l,10) if(i+j+k+l==n) ++ans;
        P(ans);
    }
    return 0;
}