import bisect

import heapq

import itertools

import math

import operator

import os

import re

import string

import sys

from collections import Counter, deque, defaultdict

from copy import deepcopy

from decimal import Decimal

from fractions import gcd

from functools import lru_cache, reduce

from operator import itemgetter, mul, add, xor



import numpy as np



if os.getenv("LOCAL"):

    sys.stdin = open("_in.txt", "r")



sys.setrecursionlimit(2147483647)

INF = float("inf")

IINF = 10 ** 18

MOD = 10 ** 9 + 7



X = int(sys.stdin.readline())

ans = 0

x = 1

s = 0

while s < X:

    s += x

    x += 1

print((x - 1))

import bisect

import heapq

import itertools

import math

import operator

import os

import re

import string

import sys

from collections import Counter, deque, defaultdict

from copy import deepcopy

from decimal import Decimal

from fractions import gcd

from functools import lru_cache, reduce

from operator import itemgetter, mul, add, xor



import numpy as np



if os.getenv("LOCAL"):

    sys.stdin = open("_in.txt", "r")



sys.setrecursionlimit(2147483647)

INF = float("inf")

IINF = 10 ** 18

MOD = 10 ** 9 + 7



X = int(sys.stdin.readline())

print((int(math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2))))



# ans = 0

# x = 1

# s = 0

# while s < X:

#     s += x

#     x += 1

# print(x - 1)

#

import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor
import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10**18
MOD = 10**9 + 7
X = int(sys.stdin.readline())
ans = 0
x = 1
s = 0
while s < X:
    s += x
    x += 1
print((x - 1))

import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor
import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10**18
MOD = 10**9 + 7
X = int(sys.stdin.readline())
print((int(math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2))))
# ans = 0
# x = 1
# s = 0
# while s < X:
#     s += x
#     x += 1
# print(x - 1)
#

-ans = 0 -x = 1 -s = 0 -while s < X: -    s += x -    x += 1 -print((x - 1)) +print((int(math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2)))) +# ans = 0 +# x = 1 +# s = 0 +# while s < X: +#     s += x +#     x += 1 +# print(x - 1) +#