#include <stdio.h>
int main()
{
    int n, i = 0, sum = 0, sum2 = 0;
    scanf("%d", &n);
    while (sum2 <= n)
    {
        i++;
        sum2 += sum + 1;
        sum += i;
    }
    printf("%d", i);
    return 0;
}