#coding: utf-8 a, b = map(int, input().split()) ans = a*b*(b-a) - a*(b**2-a**2)/2 - b*(b**2-a**2)/2 + (b**3-a**3)/3 print(-ans)