a = int(input())
cnt = 1
stack = 2
while ((a-1)/6)>cnt:
    cnt = cnt + stack
    stack += 1
if a == 1:
    print(1)
else:
    print(stack)
29a29ae131b85ac180a7f858a76e9a8dad0a7c8b
<mask token>

<mask token>
while (a - 1) / 6 > cnt:
    cnt = cnt + stack
    stack += 1
if a == 1:
    print(1)
else:
    print(stack)

a = int(input())
cnt = 1
stack = 2
while (a - 1) / 6 > cnt:
    cnt = cnt + stack
    stack += 1
if a == 1:
    print(1)
else:
    print(stack)

a = int(input())
cnt = 1
stack = 2
while ((a-1)/6)>cnt:
    cnt = cnt + stack
    stack += 1
if a == 1:
    print(1)
else:
    print(stack)