import sys input = sys.stdin.readline sys.setrecursionlimit(100000000) dy = (-1,0,1,0) dx = (0,1,0,-1) def main(): a,b = map(int,input().split()) print(((b - a)**3)/6) if __name__ =='__main__': main()