d=gets.to_i a,b=gets.split.map(&:to_i) x = a == 0 ? d : (b == 0 ? 0 : d / 2.0) x = x.to_f cost = x * a + (d - x) * b puts cost