Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

C++: #include <stdio.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int hierarchy(int num);

int main(void) {
    int num, count, i, j, k;
    
    while(scanf("%d", &num) != EOF) {
        int ans = 0;
        switch(hierarchy(num)) {
            case 1:
                j = 6;
                k = 4;
                count = 0;
                for(i = 4; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 1) j += k++;
                    i += j;
                }
                break;
            case 2:
                j = 66;
                k = 1;
                count = 9;
                for(i = 282; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 10) {
                        j += k;
                        k -= 3;
                    }
                    i += j;
                }
                break;
            case 3:
                j = -41;
                k = -11;
                count = 19;
                for(i = 633; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 20) {
                        j += k;
                        k += 3;
                    }
                    i += j;
                }
                break;
            case 4:
                j = -28;
                k = 7;
                count = 29;
                for(i = 84; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 30) j += k--;
                    i += j;
                }
                break;
            default : break;
        }
        cout << ans << endl;
    }
    
    return(0);
}

int hierarchy(int num) {
    if(num >= 0 && num <= 9)
        return(1);
    else if(num >= 10 && num <= 19)
        return(2);
    else if(num >= 20 && num <= 29)
        return(3);
    else if(num >= 30 && num <= 36)
        return(4);
    else
        return(5);
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n, i = 0;
  while(cin >> n) {
    int num = 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) num++;
          }
        }
      }
    }

    cout << num << '\n';
  }

  return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif

#define FILE_IO freopen("input.txt","r",stdin)
#define int long long
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define bp __builtin_popcount
#define debug(x) cerr << #x << " = " << x << endl;

const int MOD = 1e9 + 7;
const int INF = 1e18;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>void print(T t){for(auto &it : t)cout<<it<<" ";}
inline int powerexp(int a, int b, int m = MOD){ int res = 1;while(b){if(b&1)res = res * a % m;a = a * a % m,b >>= 1;}return res % m;}
inline int modinv(int a){ return powerexp(a,MOD-2,MOD);}
inline int lcm(int a, int b){ int g = __gcd(a,b);return a/g*b;}
inline int add(int x, int y){ x += y; if (x >= MOD) x -=  MOD; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % MOD;}
inline int sub(int x, int y){ x -= y; if (x<0) x += MOD; return x ;}

//-------------------< start here >-------------------------// 

void solve(){
    int n;
    while(cin >> n){
    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++){
			  cnt += (i + j + k + l == n);  
			}
		  }  
	   }	
	}
  cout << cnt << endl;
  }
}

//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
   IOS;
   solve();
   //find();
   #ifdef LOCAL_DEFINE
   cerr << "time elapsed " << (double)clock()/CLOCKS_PER_SEC << endl;
   #endif
}

C++: #include<iostream>

using namespace std;

int main() {
  int n;
  while(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;
  }
}

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

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

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <cstring>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

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

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

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

int main() {
	int n;
	while (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;
	}
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;

int main(){
  int n;
  while(cin>>n){
    int ans = 0;
    REP(a,10) REP(b,10) REP(c,10){
      int d = n - a - b - c;
      if( d >= 0 && d <= 9) ans++;  
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include <stdio.h>
int main(){
	int n;
	scanf("%d", &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++){
					if(a+b+c+d == n){
						++result;
					}
				}
			}
		}
	}
	printf("%d\n", result);
}