A,B=map(int,input().split()) ans=0 i=A+0 while i<=B: ans+=(i**2-(A+B)*i+A*B)*0.00001 i+=0.00001 print(abs(ans))