#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  int level = 1;
  int cubesOnLevel = 1;
  int totalCubes = 1;
  while (1) {
    cubesOnLevel = cubesOnLevel + (level + 1);
    totalCubes += cubesOnLevel;
    if (totalCubes <= n)
      level = level + 1;
    else
      break;
  }
  std::cout << level;
  return 0;
}
