http://acm.hdu.edu.cn/showproblem.php?pid=2551
//水题
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int t, n, x;
int i, j;
cin >> t;
while (t--) {
cin >> x;
n = 0; i = 1;
while (x > 0) {
n++;
x = x - pow((double)i,3);
i++;
}
cout << n << endl;
}
return 0;
}