#include int main(void){ int a,b,i1=0,i2=0,i,j; scanf("%d%d",&a,&b); if(a==0&&b==0) printf("0\n"); for(int p=0;a==i1;++i1){ } for(int p=0;b==i2;++i2){ } i=i1>i2?i2:i1; j=i1>i2?i1:i2; double ans=(2*j*j*j-2*i*i*i+3*a*b*b-3*a*j*j-3*b*j*j+3*a*i*i+3*b*i*i-3*a*b*b)/6; printf("%f\n",ans); return 0; }