x = (0..9).to_a.repeated_permutation(4).to_a
y = x.map { |a| a.inject(:+) }
loop do
  s = gets
  break if s.nil?
  n = s.chomp.to_i
  if n > 36
    puts 0
  else
    # puts x.select { |a| a.inject(:+) == n }.count
    puts y.select { |a| a == n }.count
  end
end