while line = gets
  n = line.chomp.to_i
  count = 0
    10.times do | a |
      10.times do | b | 
        10.times do | c |
          10.times do | d |
            if a + b + c + d == n
               count = count + 1
            end
          end
        end
      end 
    end
    p count
end
