#pragma GCC optimize("Ofast") #pragma GCC target("avx2") // mmap #include // write #include // exit #include #include int main() { int n; (void)scanf("%d", &n); int cnt = 1; int sum = 1; int l = 1; while (n - sum >= l) { ++cnt; sum += ++l; } printf("%d\n", cnt); exit(0); return 0; }