N = int(input()) ans = 0 while True: if ans * (ans + 1)//2 < N: ans += 1 else: break print(ans)