#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, x, cnt = 0, sum = 0;
  cin >> n;
  x = 1;
  while (1) {
    for (i = 1; i <= x; i++) {
      sum += i;
    }
    x++;
    if (sum > n) break;
    cnt++;
  }
  cout << cnt;
  return 0;
}
