#!/usr/local/bin/ruby
rec=Array.new
10.times{
   rec=gets.to_i
}
rec.reverse!
puts
for i in 0..2
      puts rec[i]
end
while n=gets.to_i
   m=0
   (0..9).to_a.repeated_permutation(4) do |a,b,c,d|
      if a+b+c+d==n
         m=m+1
      end
   end
   puts"#{m}"
end