import sys input = sys.stdin.readline def linput(): return list(map(float,input().split())) def gcd(a: int, b: int): while b: a, b = b, a%b return a def lcm(a: int, b: int): return a * b // gcd(a, b) def main(): A,B = linput() E = 10**(-6) res = 0.0 T = (A+B)/2 res -= (1/3) * B**3 + (A-T) * B**2 res += (1/3) * A**3 + (B-T) * A**2 print(res) if __name__ == "__main__": main()