#include int main() { long long int n; scanf("%lld", &n); long long int min, mid, max; max = n; min = 0; while (max - min > 1) { mid = (max + min) / 2; if (3 * mid * mid <= n) min = mid; else max = mid; } printf("%lld\n", min); return 0; }