# frozen_string_literal: true A, B = gets.chomp.split.map(&:to_i) RESULT = Rational((B - A)**3, 6).to_f puts RESULT