k, r, l = gets.split.map(&:to_i)
p = gets.to_f
e = gets.to_f
t = gets.to_f
h = 0
dp = Array.new(k+1).map{Hash.new}
dp[0][[r,l]] = 1
k.times do |i|
    dp[i].each do |k,v|
        h = (k[0].to_f + k[1].to_f)/2
        if h >= t
            dp[i+1][[k[0],h]] = v * (1 - p)
            dp[i+1][[h,k[1]]] = v * p
        else
            dp[i+1][[k[0],h]] = v * p
            dp[i+1][[h,k[1]]] = v * (1 - p)
        end
    end
end 
ans = 0
dp.pop.each do |k,v|
    h = (k[0].to_f + k[1].to_f)/2
    if h.between?(t - e, t + e)
        ans += v
    end
end
puts ans