c = gets.chomp.to_i n,s = gets.chomp.split(" ").map(&:to_i) r = (s-n)/2.0 p r*r*Math::PI*(s+n)*Math::PI * c