https://www.acmicpc.net/problem/1789
s = int(input())
total = 0
count = 0
while True:
count += 1
total += count
if total > s:
break
print(count-1)
https://www.acmicpc.net/problem/1789
s = int(input())
total = 0
count = 0
while True:
count += 1
total += count
if total > s:
break
print(count-1)