from itertools import accumulate as acc
a = [i for i in range(1000)]
a = list(acc(a))
A, B = map(int, input().split())
print(a[B - A] - B)

62ce9eff340fb1d2b3199406bb6d53f70e01b5dc
<mask token>

<mask token>
print(a[B - A] - B)

<mask token>
a = [i for i in range(1000)]
a = list(acc(a))
A, B = map(int, input().split())
print(a[B - A] - B)

from itertools import accumulate as acc
a = [i for i in range(1000)]
a = list(acc(a))
A, B = map(int, input().split())
print(a[B - A] - B)
