#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0, c = 0, s;
  cin >> n;
  while (1) {
    i++;
    s = i * (i + 1) / 2;
    if (n >= s) {
      n -= s;
      c++;
    } else {
      cout << c;
      return 0;
    }
  }
  return 0;
}
