A, B = gets.split.map(&:to_f) f = lambda{|x| x ** 3 / 3 - (A + B) / 2 * x ** 2 + A * B * x } puts f.call(A) - f.call(B)