
--{-# LANGUAGE StandaloneDeriving #-}
--{-# LANGUAGE BangPatterns #-}

module Main where

import Debug.Trace
import Control.Monad
import Data.List
--import Data.Char
import qualified Data.Set as Set
--import qualified Data.Map.Strict as Map

main :: IO ()
main = do
  a <- read <$> getLine
  --a `traceShow`
  forM_ [1..a] $ \i -> do
    print $ solve i

solve :: Int -> Int
solve i = Set.size . Set.fromList . concat $ cand
  where
    cand = [permutations [x, y, z] | x <- [1..i], y <- [1..i], z <- [1..i], x <= y, y <= z, check i x y z]

val :: Int -> Int -> Int -> Int
val x y z = x * x + y * y + z * z + x * y + y * z + z * x

check :: Int -> Int -> Int -> Int -> Bool
check i x y z = i == val x y z
