program abc9
 implicit none
 integer::N,i,x,y,z,s,t,sa,sb,sc
 read(*,*)N
 t=int(sqrt(dble(N-2))-1)
 do i=1,N
  s=0
  do x=1,t
   do y=x,t
    do z=y,t
     if(x**2+y**2+z**2+x*y+y*z+z*x==i)then
      if(x==y.and.y==z)then
       sb=sb+1
      else if(x==y.or.y==z.or.z==x)then
       sa=sa+1
      else
       sc=sc+1
      end if
     end if
    end do
   end do
  end do
 s=sc*6+(sa-sb)*3+sb
  print'(i0)',s
 end do
end program abc9