import Data.List
main = do
  ns <- getContents
  let a = sum' 4
  mapM_  print . map (\n -> a !! n) . map read $ lines ns
sum' :: Int -> [Int]
sum' 0 = [1]
sum' n =  map sum $ transpose (take 1001 $ iterate ([0]++) (sum' (n-1)))