#!/usr/bin/env python3
N = int(input())
for i in range(N):
    Vm = int(input())
    sols = []
    for x in range(1, Vm//2 + 1):
        for y in range(1, Vm//x + 1):
            if y == x: continue
            for z in range(1, Vm//x//y + 1):
                V = x*y*z
                if V > Vm: continue
                if x == z or y == z: continue
                sol = {x, y, z}
                if sol not in sols: sols.append(sol)
    print(len(sols))
