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

if Xa > Xb :
    range = Xa - Xb
else :
    range = Xb - Xa

if range % 2 == 0 :
    tiredness = ((range/2)*(range/2))+(range/2)
    tiredness = (round(tiredness))
    print ("\n")
    print (f'{tiredness}')
else :
    tiredness = (((range-1)/2)+1)*(((range-1)/2)+1)
    tiredness = (round(tiredness))
    print ("\n")
    print (f'{tiredness}')
