# frozen_string_literal: true c = gets.chomp.to_i r_i, r_o = gets.chomp.split.map(&:to_i) line = 2 * Math::PI * (r_i + Rational(r_o - r_i) / 2) volume = Math::PI * (Rational(r_o - r_i) / 2)**2 * line result = volume * c puts result