import java.io.PrintWriter; import java.util.*; public class Main { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { new Main().run(); } void run() { double a = sc.nextDouble(); double b = sc.nextDouble(); if (b < a) { double tmp = b; b = a; a = tmp; } double x3 = (double)1 / (double)3; double x2 = (a*(-1)+b*(-1)) / (double)2; double x1 = a * b; double ans = 0; ans = x3*(Math.pow(b, 3)-Math.pow(a, 3))+x2*(Math.pow(b, 2)-Math.pow(a, 2))+x1*(b-a); out.print(Math.abs(ans)); out.flush(); } }