# a = int(input("enter the ammount a: "))
# b = int(input("enter the ammount b: "))
# result = int((b+a)/2*(b+1-a))
# print(result) 

a = int(input("enter the ammount a: "))
b = int(input("enter the ammount b: "))
sum = 0 
while a <= b:
    sum = sum + a
    a = a + 1
print(sum) 
   