a,b=map(int,input().split()) d=(b-a)/100000 print(sum([d*abs(d*i*(a+d*i-b)) for i in range(100000)]))