import std.stdio;
import std.conv;
import std.algorithm;
import std.string;
import std.file;
import std.math;
 
int main() {
        string l;
        int[19] a1 = 0; // a1[x] is how many sets of two digits are there, where the sum of the two digits is x
        int[37] a2 = 0; // a2[x] is how many sets of four digits are there, where the sum of the four digits is x
        for(int i=0; i<=9; i++) for(int j=0; j<=9; j++) a1[i + j] += 1;
        for(int i=0; i<=18; i++) for(int j=0; j<=18; j++) a2[i + j] += a1[i] * a1[j];
        while((l = readln(), l.length)){
                if(l.split("\n")[0].length) printf("%d\n", a2[to!int(l.split("\n")[0])]);
                }
        return 0;
}