#include int main () { int x = 0; int res = 0; long long ans = 0LL; int cnt[81000001] = {}; int pow[301] = {}; res = scanf("%d", &x); for (int i = 0; i <= 300; i++) { pow[i] = i*i*i; } for (int d = 0; d <= 300; d++) { for (int a = 0; a <= d; a++) { for (int b = 0; b <= d; b++) { cnt[pow[a]+pow[b]+pow[d]]++; } } for (int e = d; e <= 300; e++) { for (int f = e; f <= 300; f++) { int tmp = pow[d]+pow[e]+pow[f]; if (tmp <= x && x-tmp <= pow[d]*3) { ans += (long long)cnt[x-tmp]; } } } } printf("%lld\n", ans); return 0; }