a=int(input())
b=int(input())
s = 0
i = a
while i <= b:
    s += i
    i+=1
print(s)





# i = 0
# while i < 5:
    # print('*')
    # if i % 2 == 0:
        # print('**')
    # if i > 2:
        # print('***')
    # i = i + 1
# a = 5
# while a <= 55:
    # print(a)
    # a += 2
# b = 5
# while b <= 55:
    # if b%2 == 1:
        # print(b)
    # b += 1
# n=int(input())
# c=1
# while c <= n:
    # print("*"*c)
    # c+=1
# m=int(input())
# stars="*"
# while len(stars) <=m:
    # print (stars)
    # stars+="*"