import Control.Applicative

main :: IO ()
main = do
    ns <- map read . lines <$> getContents
    mapM_ print $ solve ns

solve :: [Int] -> [Int]
solve [] = []
solve (n':ns) = (solve' n'):(solve ns)
    where
        solve' :: Int -> Int
        solve' n = length [
            [a,b,c,d] | a <- [0..9],
                        b <- [0..9],
                        c <- [0..9],
                        d <- [0..9],
                        n == sum [a,b,c,d]
            ]