#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int current = 0;
  int i = 1, i2 = 2;
  int ans = 0;
  while (current + i <= n) {
    current += i;
    ans++;
    i += i2;
    i2++;
  }
  cout << ans;
}
