#include #include #include #include #include #include using namespace std; using ll = long long; void solve(); int main() { solve(); #ifdef DBG while (true); #endif } //508 void solve() { ll n, i; scanf("%lld", &n); for (i = 1; i < n; i++) { if (abs(i * i * 3 - n) > 1000000) continue; printf("%lld\n", i); break; } }