def f(n)
  count = 0
  (1..n).each { |x|
    (1..n).each { |y|
      (1..n).each { |z|
        if x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x == n
          count += 1
        end
      }
    }
  }
  count
end

nn = gets.chomp.to_i
(1..nn).each do |n|
  puts f(n)
end