#include <bits/stdc++.h>
using namespace std;
int dp[10005];
int main() {
  int n;
  scanf("%d", &n);
  dp[1] = 1;
  for (int i = 2; i <= 100; i++) dp[i] = dp[i - 1] + i * (i + 1) / 2;
  for (int i = 100; i >= 1; i--) {
    if (dp[i] <= n) {
      printf("%d\n", i);
      return 0;
    }
  }
  return 0;
}
