module Main where

import Control.Monad (replicateM)

main :: IO ()
main = getContents >>= mapM_ (print . count . read) . lines
  where
    count :: Int -> Int
    count n = length $ filter (\xs -> sum xs == n) $ replicateM 4 [1..9]