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