a = gets.to_i p0, p1, p2 = gets.split.map{|s|1.0 - s.to_f / 100} list = [1.0] * 16 list[0] = 0.0 list[15] = 0.0 next_list = nil (80 - a).times do next_list = list.clone (1..14).each do |i| next_list[i] = list[i] * (p0 * (1.0 - list[i - 1]) * (1.0 - list[i + 1]) + p1 * (1.0 - list[i - 1]) * list[i + 1] + p1 * list[i - 1] * (1.0 - list[i + 1]) + p2 * list[i - 1] * list[i + 1] ) end list = next_list end puts list.inject{|s, p|s + p} * 2