def okaj(xxx):
    xxx= int(xxx)
    j=0; jog=0
    li=[]
    for i in range(1,1001):
        if i%2==1:
            j+=1
        jog +=j
        li.append(jog)
        
    return li[xxx-1]

a= int(input())
b= int(input())
c= abs(a-b)
print(okaj(c))