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