a,b = map(int, input().split())
if(a>b): a,b = b,a
print((b-a+1)*(a+b)//2)
77d255ade2f0613c32a1d3ebbd15a2a0a6f734c9
<mask token>

<mask token>
if a > b:
    a, b = b, a
print((b - a + 1) * (a + b) // 2)

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

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