if $0 == __FILE__ v1, v2 = gets.split(" ").map(&:to_i) d = gets.to_i w = gets.to_i t = d.to_f / (v1+v2) p w * t end