import sys,itertools

for n in map(int,sys.stdin):

  x=0

  for num in itertools.product("0123456789",repeat=4):

    eq="{}+{}+{}+{}".format(*(num))

    if eval(eq)==n:x+=1

  print(x)
import sys

A=list(range(10))

for n in map(int,sys.stdin):

  x=0

  for a in A:

    d=n-a

    if 0>d or d>27:continue

    for b in A:

      e=d-b

      if 0>e or e>18:continue

      for c in A:

        if (e-c)in A:x+=1

  print(x)
import sys, itertools

for n in map(int, sys.stdin):
    x = 0
    for num in itertools.product("0123456789", repeat=4):
        eq = "{}+{}+{}+{}".format(*(num))
        if eval(eq) == n:
            x += 1
    print(x)

import sys

A = list(range(10))
for n in map(int, sys.stdin):
    x = 0
    for a in A:
        d = n - a
        if 0 > d or d > 27:
            continue
        for b in A:
            e = d - b
            if 0 > e or e > 18:
                continue
            for c in A:
                if (e - c) in A:
                    x += 1
    print(x)

-import sys, itertools +import sys +A = list(range(10)) -    for num in itertools.product("0123456789", repeat=4): -        eq = "{}+{}+{}+{}".format(*(num)) -        if eval(eq) == n: -            x += 1 +    for a in A: +        d = n - a +        if 0 > d or d > 27: +            continue +        for b in A: +            e = d - b +            if 0 > e or e > 18: +                continue +            for c in A: +                if (e - c) in A: +                    x += 1