a,b = map(int,input().split()) def f(x): return x**3/3 - (a+b)/2*x**2 + a*b*x print(-f(b)+f(a))