import sys a,b = map(int, sys.stdin.readline().strip().split()) s = ((b - a) ** 3) / 6 print(s)