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

6696944ac2843668ab1e430fb33e3b89f9ebda3c
<mask token>

<mask token>
print(B * (B + 1) // 2 - A * (A + 1) // 2 + A)

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