#!/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):
            for z in range(1, Vm//x//y + 1):
                V = x*y*z
                if V > Vm: continue
                if x == y or x == z or y == z: continue
                sols.append({x, y, z})
    printed = []
    #print(len(sols))
    solcount = 0
    for sol in sols:
        if sol in printed: continue
        #print(sol)
        solcount += 1
        printed.append(sol)
    print(solcount)
