x = int(input()) ans = 0 atoc = dict() for d in range(301): cd = d*d*d xi = x - cd if xi < 0: break for a in range(d+1): ca = a*a*a if ca + cd > xi: break for b in range(a, d+1): total = ca + b*b*b + cd if total > xi: break if total in atoc: atoc[total] += 1 else: atoc[total] = 1 for e in range(d, 301): ce = e*e*e if ce > xi: break for f in range(e, 301): total = ce + f*f*f if total > xi: break if xi - total in atoc: ans += atoc[xi - total] print(ans)