c = gets.to_f i, o = gets.split.map(&:to_f) l = (i + o) / 2 r = (o - i) / 2 s = Math::PI * r ** 2 puts 2 * Math::PI * l * s * c