program pyramid;
var
L, N,area, lato : LongInt;
begin
{
uncomment the two following lines if you want to read/write from files
assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);
}
ReadLn(N);
L := 0; area:=0;
while area<=N do
begin
L:=L+1;
area:=area+L*L;
if area>N then continue;
end;
WriteLn(L-1);
end.
cHJvZ3JhbSBweXJhbWlkOwoKdmFyCiAgICBMLCBOLGFyZWEsIGxhdG8gOiBMb25nSW50OwoKYmVnaW4KewogICAgdW5jb21tZW50IHRoZSB0d28gZm9sbG93aW5nIGxpbmVzIGlmIHlvdSB3YW50IHRvIHJlYWQvd3JpdGUgZnJvbSBmaWxlcwogICAgYXNzaWduKGlucHV0LCAgJ2lucHV0LnR4dCcpOyAgcmVzZXQoaW5wdXQpOwogICAgYXNzaWduKG91dHB1dCwgJ291dHB1dC50eHQnKTsgcmV3cml0ZShvdXRwdXQpOwp9CgogICAgUmVhZExuKE4pOwogICAgTCA6PSAwOyBhcmVhOj0wOwogICAgd2hpbGUgYXJlYTw9TiBkbwogICAgICAgICAgICAgICAgICAgYmVnaW4KICAgICAgICAgICAgICAgICAgICBMOj1MKzE7CiAgICAgICAgICAgICAgICAgICAgYXJlYTo9YXJlYStMKkw7CiAgICAgICAgICAgICAgICAgICAgaWYgYXJlYT5OIHRoZW4gY29udGludWU7CiAgICAgICAgICAgICAgICAgICBlbmQ7CiAgICBXcml0ZUxuKEwtMSk7CgplbmQu