In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.
It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.
Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.
Assume also that the depth of the snow cover is always at least 1 meter.

-----Constraints-----
 - 1 \leq a < b < 499500(=1+2+3+...+999)
 - All values in input are integers.
 - There is no input that contradicts the assumption.

-----Input-----
Input is given from Standard Input in the following format:
a b

-----Output-----
If the depth of the snow cover is x meters, print x as an integer.

-----Sample Input-----
8 13

-----Sample Output-----
2

The heights of the two towers are 10 meters and 15 meters, respectively.
Thus, we can see that the depth of the snow cover is 2 meters.

Difficulty: EASY

Solutions:
(a, b) = map(int, input().split())
print(int((b - a) * (b - a + 1) / 2) - b)


(a, b) = [int(x) for x in input().split()]
print(1 * (b - a + 1) * (b - a) // 2 - b)


(A, B) = map(int, input().split())
c = B - A
print(c * (c + 1) // 2 - B)


(a, b) = map(int, input().split())
N = b - a
B = N * (N + 1) // 2
ans = B - b
print(ans)


(a, b) = map(int, input().split())
n = b - a - 1
x = (n ** 2 + n - a * 2) // 2
print(x)


(a, b) = map(int, input().split())
d = b - a
m = d * (d - 1) // 2
print(m - a)


(x, y) = map(int, input().split())
tmp = y - x
print((tmp + 1) * tmp // 2 - y)


(a, b) = map(int, input().split())
c = b - a
s = (1 + c) * c // 2
print(s - b)


(A, B) = [int(s) for s in input().split()]
x = B - A
y = x * (x - 1) // 2
print(y - A)


(a, b) = map(int, input().split())
c = b - a
wa = c * (c + 1) // 2
print(wa - b)


(a, b) = map(int, input().split())
c = b - a
print((c * c + c) // 2 - b)


(a, b) = map(int, input().split())
x = b - a
c = (1 + x) * x // 2
print(c - b)


(A, B) = map(int, input().split())
N = B - A
X = N * (N + 1) // 2
print(X - B)


(a, b) = [int(i) for i in input().split()]
print((b - a + 1) * (b - a) // 2 - b)


(a, b) = map(int, input().split())
d = b - a
print(-~d * d // 2 - b)


(a, b) = map(int, input().split())
n = b - a
s = n * (n + 1) // 2
print(s - b)


(a, b) = map(int, input().split())
d = b - a
r = d * (d + 1) // 2 - b
print(r)


(a, b) = list(map(int, input().split()))
x = b - a
print(x * (x + 1) // 2 - b)


(a, b) = map(int, input().split())
d = b - a
s = (d + 1) * d // 2
ans = s - b
print(ans)


(a, b) = map(int, input().split())
k = b - a
print(-~k * k // 2 - b)


(a, b) = list(map(int, input().split(' ')))
i = b - a
print(i * (i - 1) // 2 - a)


[a, b] = list(map(int, input().split()))
d = b - a
print(d * (d + 1) // 2 - b)


(a, b) = list(map(int, input().split()))
N = b - a
print(N * (N + 1) // 2 - b)


(a, b) = map(int, input().split())
c = b - a
t = int(c * (2 + (c - 1)) / 2)
print(t - b)


(a, b) = map(int, input().split())
n = b - a
print(int(0.5 * n * (n + 1) - b))


(a, b) = map(int, input().split())
n = b - a
c = (1 + n) * n // 2
print(c - b)


(a, b) = map(int, input().split())
k = b - a - 1
l = k * (k + 1) / 2
print(int(l - a))


(a, b) = map(int, input().split())
n = b - a
bl = n * (n + 1) // 2
print(bl - b)


(a, b) = map(int, input().split())
n = b - a
ans = n * (n + 1) // 2 - b
print(ans)


import sys
lines = [s.rstrip('\n') for s in sys.stdin.readlines()]
(a, b) = [int(num) for num in lines.pop(0).split(' ')]
dif = b - a
height = dif * (dif - 1) // 2
print(height - a)


(a, b) = map(int, input().split())
k = b - a
sum = 0
print(int(k * (k + 1) / 2 - b))


(a, b) = map(int, input().split())
c = b - a
ans = int(c * (c + 1) / 2 - b)
print(ans)


(a, b) = map(int, input().split())
n = b - a
sumn = n * (n + 1) // 2
print(sumn - b)


(a, b) = map(int, input().split())
n = b - a
m = n * (n + 1) // 2
print(int(m - b))


(a, b) = map(int, input().split())
c = b - a
h = c * (c + 1) // 2
print(h - b)


(a, b) = map(int, input().split())
n = b - a
h = n * (n + 1) // 2 - b
print(h)


(a, b) = map(int, input().split())
n = b - a
S = n * (n + 1) // 2 - b
print(S)


(a, b) = map(int, input().split())
be = b - a
bh = (1 + be) * be // 2
print(bh - b)


(a, b) = map(int, input().split())
c = b - a
ha = c * (c - 1) // 2
print(ha - a)


(a, b) = map(int, input().split())
k = b - a - 1
ans = k * (k + 1) // 2 - a
print(ans)


(A, B) = map(int, input().split())
res = (B - A) * (B - A - 1) // 2 - A
print(res)


(x, y) = map(int, input().split())
a = y - x
b = a * (a - 1) / 2
print(round(b - x))


(a, b) = map(int, input().split())
n = b - a
print((n * n + n) // 2 - b)


(a, b) = map(int, input().split())
n = b - a
print(int(n * (n + 1) / 2.0) - b)


(a, b) = map(int, input().split())
x = b - a
wa = (x ** 2 + x) // 2
print(wa - b)