#include <bits/stdc++.h>
using namespace std;
int a[1001];
int main() {
  int n;
  cin >> n;
  int l = 1, sum = 1;
  while (n >= sum) {
    sum = sum + l;
    n = n - sum;
    if (n >= sum)
      l++;
    else
      break;
  }
  cout << l;
  return 0;
}
