#include <bits/stdc++.h>
using namespace std;
const int M = 998244353;
void solve() {
  int a = 1, b = 1, c, ans = 0;
  cin >> c;
  while (c >= 0) {
    if (c - a >= 0) ans++;
    c -= a;
    b++;
    a += b;
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
