int@X,L=301,M=L+1,A=0,Y;double u;double t[300**3*3+1]{};rep(a,L)rep(b,a,L)rep(c,b,L)(t[a**3+b**3+c**3]*=M)+=c+1;rep(d,L)rep(e,d,L)rep(f,e,L){if((Y=X-d**3-e**3-f**3)>=0){auto&s=t[Y];while(s)d>=(u=((u=s/M)-(Y=u))*M)-1?++A:A,s=(s-u)/M;}}wt(A);