main = interact $ unlines.solve.map read.words

solve :: [Int] -> [String]
solve []     = []
solve (n:ns) = (show.length $ anslist):solve ns
    where anslist = [(a,b,c,d) | a <- [0..9], b <- [0..9], c <- [0..9], d <- [0..9], a+b+c+d == n] 