a,b = map(int,input().split()) ans = abs((a-b)**3/6) print(ans)