a = int(input("Masukkan kordinat a : "))
b = int(input("Masukkan kordinat b: "))

if a > b :
    range = a - b
else :
    range = b - a

if range % 2 == 0 :
    tiredness = ((range/2)*(range/2))+(range/2)
    print (round(tiredness))
else :
    tiredness = (((range-1)/2)+1)*(((range-1)/2)+1)
    print (round(tiredness))
