#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) const int N=81000005; int cnt[N]; signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); int x; cin >> x; ll res=0; for(int d=0; d<=300; ++d){ // add c=d for(int a=0; a<=d; ++a) for(int b=a; b<=d; ++b) cnt[a*a*a+b*b*b+d*d*d]++; for(int e=d; e<=300; ++e) for(int f=e; f<=300; ++f){ int y=x-d*d*d-e*e*e-f*f*f; if(y>=0&&y