main :: IO()
main = getContents >>= mapM_ (print . length . solve) . (map read . lines) 
    where solve n = [ [a, b, c, d] | a <- [0..9], b <- [0..9], c <- [0..9], let d = n - a - b - c, d >= 0, d <= 9]
