int@X,L=301,M=L+1,A=0,C[L],t[L**3*3]{},s;rep(p,L)C[p]=p**3;rep(a,L)rep(b,a,L)rep(c,b,L)(t[C[a]+C[b]+C[c]]*=M)+=c+1;rep(d,L)rep(e,d,L)rep(f,e,L){s=t[X-C[d]-C[e]-C[f]];while(s)d>=s%M-1?++A:A,s/=M;}wt(A);