#include <bits/stdc++.h>
using namespace std;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
int a[101];
string s;
int k, n, t, opt;
int mod = 1988;
int dp[5000 + 1][5000 + 1];
int dp2[27][100 + 1];
set<string> ss;
set<string>::iterator it;
int solv2(int i, int j) {
  if (j == n) return 0;
  if (dp2[i][j] != -1) return dp2[i][j];
  if ((s[j] - 'a') >= i) {
    return dp2[i][j] = max(1 + solv2((s[j] - 'a'), j + 1), solv2(i, j + 1));
  } else
    return dp2[i][j] = solv2(i, j + 1);
}
int printt(int i, int j, string so) {
  if (j == n) {
    cout << so.size();
    if (so.size() == opt) {
      ss.insert(so);
    }
    return 0;
  }
  if (dp2[i][j] != -1) return dp2[i][j];
  if ((s[j] - 'a') >= i) {
    return dp2[i][j] = max(1 + printt((s[j] - 'a'), j + 1, (so + s[j])),
                           printt(i, j + 1, so));
  } else
    return dp2[i][j] = printt(i, j + 1, so);
}
int solv(int sum, int prev, int j) {
  if (sum == 0 && j == k) return 1;
  if (sum <= 0 || j >= k) return 0;
  if (dp[sum][j] != -1) return dp[sum][j];
  int re = 0;
  if (j == k - 1) {
    return dp[sum][j] = (sum < prev) ? 0 : 1;
  }
  for (int i = prev; i <= (sum / (k - j)) + 1; i++) {
    re += solv(sum - i, i, j + 1) % mod;
  }
  return dp[sum][j] = re % mod;
}
int main() {
  int m, res = 0, be = 1;
  scanf("%d", &m);
  int i = 1;
  while (be <= m) {
    res += 1;
    m -= be;
    i++;
    be += i;
  }
  cout << res;
  return 0;
}
