import System.IO
import Data.List

f n m
 | m > 9 = f n 9
 | n == 0 = [[]]
 | m == 1 = [replicate n 1]
 | n < m = f n n
 | otherwise = (map (m:) (f (n-m) m)) ++ (f n (m-1))
main = do
    n <- readLn
    putStrLn . show . sum . map (length . nub . permutations) . filter (\n -> (length n) == 4) $ f n n

