# import module import sys import math import numpy as np a , b = map(int,input().split()) s = ((b-a)**3) / 6 if s == 0: print(0) else: print(s)