import sys input = sys.stdin.readline def main(): n=int(input()) d=dict() ans = 0 for m0 in range(0,301): m03 = m0*m0*m0 for m1 in range(0,m0+1): m13 = m1*m1*m1 for m2 in range(m1,m0+1): m23 = m2*m2*m2 d[m03+m13+m23]=d.get(m03+m13+m23, 0) + 1 for m1 in range(m0, 301): m13 = m1*m1*m1 for m2 in range(m1, 301): m23 = m2*m2*m2 ans+=d.get(n-m03-m13-m23, 0) print(ans) if __name__ == "__main__": main()