#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
#include <cctype>

#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>


using namespace std;

#define Max INT_MAX
#define Inf (INT_MAX/2)
#define Min INT_MIN


#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i,l,n) for(int (i)=(int)(l);(i)<(int)(n);(i)++)
// s <= x < g ?
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
// 0 <= x < w && 0 <= y < h ?
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))

typedef pair<int, int> P;

int main()
{
    int n;

    while( cin >> n ){
        int count =0;
        if( n == 0 ) { break; }
        for( int a=9; 0 <= a; a-- ){
            for( int b=9; 0<=b; b-- ){
                for( int c=9; 0<=c; c-- ){
                    for( int d=9; 0<=d; d-- ){
                        if( a+b+c+d==n ){
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
}