N = gets.chomp.to_i
F = Array.new(N,0)

1.upto(N) do |n|
  cnt = 0
  3.upto(90) do |a|
    next if a**2 <= n
   3.upto(100) do |b|
     
     if (a**2-b) == n and a >= 3 and b >= 3
       (1..(a-2)).each do |x|
         (1..(a-x)).each do |y|
           next if x+y > a
           next if x*y > b
           (1..(a-x-y)).each do |z|
             next if x+y+z != a
             next if x*y+y*z+z*x != b
             cnt += 1
           end
         end
       end
     end
   end
  end
  F[n-1] = cnt
end

F.each do |f|
  p f
end