#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using Int = long long; template ostream &operator<<(ostream &os, const pair &a) { return os << "(" << a.first << ", " << a.second << ")"; }; template ostream &operator<<(ostream &os, const vector &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; } template void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; } template bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; } template bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; } #define COLOR(s) ("\x1b[" s "m") constexpr int L = 300; constexpr int cu(int a) { return a * a * a; } int freq[3 * cu(L) + 1]; int main() { int X; for (; ~scanf("%d", &X); ) { #ifdef LOCAL memset(freq, 0, sizeof(freq)); #endif Int ans = 0; for (int d = 0; d <= L; ++d) { for (int b = 0; b <= d; ++b) for (int a = 0; a <= b; ++a) { ++freq[cu(a) + cu(b) + cu(d)]; } for (int e = d; e <= L; ++e) { for (int f = e; f <= L; ++f) { const int tar = X - (cu(d) + cu(e) + cu(f)); if (tar < 0) break; ans += freq[tar]; } } } printf("%lld\n", ans); } return 0; }