human
Each evening after the dinner the SIS's students gather together to play the game of Sport Mafia. 

For the tournament, Alya puts candies into the box, which will serve as a prize for a winner. To do that, she performs n actions. The first action performed is to put a single candy into the box. For each of the remaining moves she can choose from two options:

  * the first option, in case the box contains at least one candy, is to take exactly one candy out and eat it. This way the number of candies in the box decreased by 1.

  * the second option is to put candies in the box. In this case, Alya will put 1 more candy, than she put in the previous time. 


Thus, if the box is empty, then it can only use the second option.

For example, one possible sequence of Alya's actions look as follows:

  * put one candy into the box.

  * put two candies into the box.

  * eat one candy from the box.

  * eat one candy from the box.

  * put three candies into the box.

  * eat one candy from the box.

  * put four candies into the box.

  * eat one candy from the box.

  * put five candies into the box.



This way she will perform 9 actions, the number of candies at the end will be 11, while Alya will eat 4 candies in total.

You know the total number of actions n and the number of candies at the end k. You need to find the total number of sweets Alya ate. That is the number of moves of the first option. It's guaranteed, that for the given n and k the answer always exists.

Please note, that during an action of the first option, Alya takes out and eats exactly one candy.

Input

The first line contains two integers n and k (1 ≤ n ≤ 10^9.
0 ≤ k ≤ 10^9) — the total number of moves and the number of candies in the box at the end. 

It's guaranteed, that for the given n and k the answer exists.

Output

Print a single integer — the number of candies, which Alya ate. Please note, that in this problem there aren't multiple possible answers — the answer is unique for any input data. 

Examples

Input

1...

What is a Python program to find the total number of sweets Alya ate?
assistant
#Here is Python program to find the total number of sweets Alya ate.

import collections
import random
import heapq
import bisect
import math
import time
# import operator as op
# from functools import reduce

class Solution2:

    def solve(self, s):
        pass
        

class Solution:

    def solve(self, n, k):
        
        grow = 1
        tot = 0

        while n != tot - k:
            tot += grow
            grow += 1
            n -= 1
        return tot - k

sol = Solution()
sol2 = Solution2()

#TT = int(input())
for test_case in range(1):
    N, K = input().split()
    # s = []
    # for _ in range(int(N)):
    #     s.append(int(input()))

    out = sol.solve(int(N),int(K))
    print(str(out))
    #print("Case #" + str(test_case+1) + ": " + str(out))

    # out2 = sol2.solve(s)
    # print("Case #" + str(i+1) + ": " + str(out2))

# for _ in range(100000):
#     rand = [random.randrange(60) for _ in range(10)]
#     out1 = sol.solve(rand)
#     out2 = sol2.solve(rand)
#     if out1 != out2: 
#         print(rand, out1, out2)
#         break