human
Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale:

"Once upon a time, there lived an emperor. He was very rich and had much grain. One day he ordered to build a huge barn to put there all his grain. Best builders were building that barn for three days and three nights. But they overlooked and there remained a little hole in the barn, from which every day sparrows came through. Here flew a sparrow, took a grain and flew away..."

More formally, the following takes place in the fairy tale. At the beginning of the first day the barn with the capacity of n grains was full. Then, every day (starting with the first day) the following happens:

  * m grains are brought to the barn. If m grains doesn't fit to the barn, the barn becomes full and the grains that doesn't fit are brought back (in this problem we can assume that the grains that doesn't fit to the barn are not taken into account). 
  * Sparrows come and eat grain. In the i-th day i sparrows come, that is on the first day one sparrow come, on the second day two sparrows come and so on. Every sparrow eats one grain. If the barn is empty, a sparrow eats nothing. 


Anton is tired of listening how Danik describes every sparrow that eats grain from the barn. Anton doesn't know when the fairy tale ends, so he asked you to determine, by the end of which day the barn will become empty for the first time. Help Anton and write a program that will determine the number of that day!

Input

The only line of the input contains two integers n and m (1 ≤ n, m ≤ 1018) — the capacity of the barn and the number of grains that are brought every day.

Output

Output one integer — the number of the day when the barn will become empty for the first time. Days are numbered starting with one.

Examples

Input

5 2

Output

4

Input

8 1

Output

5

Note

In the first sample the capacity of the barn is five grains and two grains are brought every day. The following happens:

  * At the...
 Can you provide a Python code to determine the number of that day!?
assistant
#Here is Python code to determine the number of that day!
.

class Solution(object):
    def __init__(self, n, m):
        self.n = n
        self.m = min(n - 1, m)

    def solve(self):
        if self.n == 1:
            return 1

        l = 1
        r = 10 ** 20

        while l <= r:
            mid = (l + r) >> 1
            if self.eaten(mid):
                r = mid - 1
            else:
                l = mid + 1

        return l

    def eaten(self, mid):
        day = self.m
        if mid < day:
            return False

        a = self.n + (mid - day) * self.m 
        b = (day + mid) * (mid - day + 1) / 2

        return a <= b

    def simulate(self):
        day = 1
        cur = self.n
        while True:
            cur = min(self.n, cur + self.m)
            cur = max(0, cur - day)

            if cur == 0:
                return day

            day += 1


if __name__ == '__main__':
    assert Solution(5, 2).eaten(1) == False
    assert Solution(5, 2).eaten(2) == False
    assert Solution(5, 2).eaten(3) == False
    assert Solution(5, 2).eaten(4) == True
    assert Solution(5, 2).eaten(5) == True

    assert Solution(5, 2).eaten(123456) == True

    assert Solution(5, 4).solve() == 5

    assert Solution(5, 2).solve() == 4
    assert Solution(8, 1).solve() == 5

    assert Solution(1, 1).solve() == 1
    assert Solution(2, 1).solve() == 2
    assert Solution(2, 2).solve() == 2
    assert Solution(2, 3).solve() == 2
    assert Solution(5, 2).solve() == 4
    assert Solution(8, 1).solve() == 5


    (a, b) = map(int, raw_input().split())
    print Solution(a, b).solve()