#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = 0;
  int j = 0;
  int ans = 0;
  while (j < n) {
    i += (ans + 1);
    j += i;
    if (j > n) break;
    ans++;
  }
  cout << ans << endl;
}
