Two friends are on the coordinate axis Ox in points with integer coordinates. One of them is in the point x_1 = a, another one is in the point x_2 = b. 

Each of the friends can move by one along the line in any direction unlimited number of times. When a friend moves, the tiredness of a friend changes according to the following rules: the first move increases the tiredness by 1, the second move increases the tiredness by 2, the third — by 3 and so on. For example, if a friend moves first to the left, then to the right (returning to the same point), and then again to the left his tiredness becomes equal to 1 + 2 + 3 = 6.

The friends want to meet in a integer point. Determine the minimum total tiredness they should gain, if they meet in the same point.


-----Input-----

The first line contains a single integer a (1 ≤ a ≤ 1000) — the initial position of the first friend. 

The second line contains a single integer b (1 ≤ b ≤ 1000) — the initial position of the second friend.

It is guaranteed that a ≠ b.


-----Output-----

Print the minimum possible total tiredness if the friends meet in the same point.


-----Examples-----
Input
3
4

Output
1

Input
101
99

Output
2

Input
5
10

Output
9



-----Note-----

In the first example the first friend should move by one to the right (then the meeting happens at point 4), or the second friend should move by one to the left (then the meeting happens at point 3). In both cases, the total tiredness becomes 1.

In the second example the first friend should move by one to the left, and the second friend should move by one to the right. Then they meet in the point 100, and the total tiredness becomes 1 + 1 = 2.

In the third example one of the optimal ways is the following. The first friend should move three times to the right, and the second friend — two times to the left. Thus the friends meet in the point 8, and the total tiredness becomes 1 + 2 + 3 + 1 + 2 = 9.

Difficulty: interview

Starter code:

Solutions:
a=int(input())
b=int(input())
c=(a+b)//2
def f(x):
    x=abs(x)
    return x*(x+1)//2
print(f(c-a)+f(b-c))


s = [0]
for i in range(1, 2000):
    s.append(s[-1] + i)

a, b = int(input()), int(input())
x = abs(a-b)

print(s[x//2] + s[x - x//2])


a = int(input())
b = int(input())
middle = (a + b) // 2
d1 = abs(a - middle)
d2 = abs(b - middle)
print(d1 * (d1 + 1) // 2 + d2 * (d2 + 1) // 2)


a = int(input())
b = int(input())

dist = abs(a - b)
half = dist // 2
if dist % 2 == 0:
    print(half * (half + 1))
else:
    print(half * (half + 1) // 2 + (half + 1) * (half + 2) // 2)


A, B = int(input()),int(input())

res = 0
curA = 1
curB = 1
A, B = min(A, B), max(A, B)
while A != B:
    A += 1
    res += curA
    curA += 1

    if A == B:
        break

    B -= 1
    res += curB
    curB += 1

print(res)


a = int(input())
b = int(input())
l = abs(a - b)
aa = l // 2
bb = l - aa
print(aa * (aa + 1) // 2 + bb * (bb + 1) // 2)


a = int(input())
b = int(input())
n = abs(a - b) // 2
print(n * (n + 1) + (abs(a - b) % 2) * (n + 1))

# :)
a = int(input())
b = int(input())
d = abs(a - b)
s = (1 + d//2)* (d // 2)
if d % 2 == 1:
    s += d // 2 + 1
print(s)

R = lambda : map(int, input().split())
a = int(input())
b = int(input())
if (a>b):
    a,b=b,a
m=(a+b)//2
d=lambda x: (x*(x+1))//2
print(d(m-a)+d(b-m))

a = int(input())
b = int(input())
n = abs(a-b)
k = n- (n//2)
n = n//2
res = (n*(n+1))//2 + (k*(k+1))//2
print(res)


a=int(input())
b = int(input())
s = 1
ans = 0
for i in range(abs(b-a)//2):
    ans += s*2
    s +=1
if abs(b-a)%2==1:
    ans += s
print(ans)

# cook your dish here
# from math import * 
#for _ in range(int(input().strip())):
a=int(input())
b=int(input())
mid = (a+b)//2

a=abs(mid-a)
b=abs(mid-b)
print((a*(a+1))//2 + (b*(b+1))//2)

x1 = int(input())
x2 = int(input())
ust = 1
ans = 0
s = abs(x2 - x1)
while s > 1:
    s -= 2
    ans += ust * 2
    ust += 1
if s == 1:
    ans += ust
print(ans)

a = int(input())
b = int(input())
dist = abs(a - b)
t1 = dist // 2
t2 = (dist + 1) // 2
print(t1 * (t1 + 1) // 2 + t2 * (t2 + 1) // 2)


a = int(input())
b = int(input())

n = abs(b-a)

t = n//2
if n%2:
	print ((2*t*(t+1)//2)+(t+1))
else:
	print (2*t*(t+1)//2)

dist = abs(int(input()) - int(input()))
print((dist // 2) * (dist // 2 + 1) + (dist % 2) * (dist + 1) // 2)

a,b=int(input()),int(input())
a,b=min(a,b),max(a,b)
m=(a+b)//2
i=m-a
j=b-m
ans=((i+1)*i)//2
ans+=((j+1)*j)//2
print(ans)


import math

def f(n):
    return sum(list(range(n+1)))


a = int(input())
b = int(input())

middle = (a+b)//2

dist1 = int(math.fabs(a-middle))
dist2 = int(math.fabs(b-middle))

print(f(dist1) + f(dist2))




a = int(input())
b = int(input())

if a > b:
    a,b=b,a

i = 1
r = 0
while True:
    if a == b:
        print(r)
        break
    if b-a==1:
        r += i
        print(r)
        break
    r += 2*i
    i += 1
    b -= 2


a = int(input())

b = int(input())

dist = abs(b - a)

d1 = dist // 2

d2 = dist - d1

u1 = (d1 + 1) * d1 // 2

u2 = (d2 + 1) * d2 // 2 

print(u1 + u2)

a = int(input())
b = int(input())
ans = 0
for i in range(1, abs(b - a) // 2 + 1):
    ans += 2 * i
if abs(a - b) % 2 != 0:
    ans += abs(b - a) // 2 + 1
print(ans)


a = int(input())
b = int(input())
n = abs(a - b) // 2
n2 = abs(a - b) % 2
n * (n+1) + n
print((n+1)*(n+n2))


a = int(input());
b = int(input());
r = abs(a - b);
ca = 1;
cb = 1;
ans = 0;
while r > 0:
    r = r - 1;
    ans = ans + ca;
    ca = ca + 1;
    if r <= 0:
        break;
    r = r - 1;
    ans = ans + cb;
    cb = cb + 1;
print(ans);

a=int(input())
b=int(input())

diff=max(a-b,b-a)

p1=int(diff/2)
p2=int((diff+1)/2)

cost=int(p1*(p1+1)/2+p2*(p2+1)/2)
print(cost)

#Python is love <3
a = int(input())
b = int(input())
if((abs(b-a))%2==0):
   w = (abs(b-a))//2
   p = (w*(w+1))
   print(p)
else:
    w = (abs(b-a))//2
    p = (w * (w + 1))
    print(p+w+1)