local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, '*'..string.sub(k, i, i)) end local r = io.read local u = table.unpack or unpack return function() return r(u(a)) end end})
-----------------------
local N = read.n()
local L = 100
for i=1,N do
    local cnt = 0
    for x=1,L do
        local a = x*x
        if a > i then
            break
        end
        for y=1,L do
            local b = a + y*y+x*y
            if b > i then
                break
            end
            for z=1,L do
                local c = b + z*z + y*z + z*x
                if c > i then
                    break
                end
                if c == i then
                    cnt = cnt + 1
                end
            end
        end
    end
    print(cnt)
end