#include int main () { int x = 0; int res = 0; int ans = 0; int flag[27000001] = {}; int pow[301] = {}; res = scanf("%d", &x); for (int i = 0; i <= 300; i++) { pow[i] = i*i*i; flag[pow[i]] = 1; } for (int f = 300; f >= 0; f--) { int tmp1 = pow[f]; if (tmp1 <= x) { for (int e = f; e >= 0; e--) { int tmp2 = tmp1+pow[e]; if (tmp2 <= x) { for (int d = e; d >= 0; d--) { int tmp3 = tmp2+pow[d]; if (tmp3 <= x) { for (int c = d; c >= 0; c--) { int tmp4 = tmp3+pow[c]; if (tmp4 <= x) { for (int b = c; b >= 0; b--) { int tmp = tmp4+pow[b]; if (tmp <= x && x-tmp <= pow[b]) { ans += flag[x-tmp]; } } } } } } } } } } printf("%d\n", ans); return 0; }