#include <bits/stdc++.h>

#define rep(n) for(int i=0;i<n;i++)
#define repp(j, n) for(int j=0;j<n;j++)
#define reppp(i, m, n) for(int i=m;i<n;i++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl

using namespace std;

typedef long long ll;
typedef pair<ll, ll> Pll;
typedef pair<int, int> Pii;
struct edge{int from, to; ll cost;};

const ll MOD = 1000000007;
const long double EPS = 1e-10;

long double p,e,t;

long double search(int sleep_cnt, long double r, long double l, long double prob){
    long double ret = 0.0, h = (r+l)/2;

    if(!sleep_cnt){
        if(abs(h-t) <= e) return prob;
        else return 0.0;
    }
    if((t-e <= r && l <= t) || (t <= r && l <= t+e)) return prob;
    if((r <= t-e && l <= t-e) || (t+e <= r && t+e <= l)) return 0.0;
    
    sleep_cnt--;
    if(h >= t){
        ret += search(sleep_cnt, r, h, prob*(1-p));
        ret += search(sleep_cnt, h, l, prob*p);
    }else{
        ret += search(sleep_cnt, r, h, prob*p);
        ret += search(sleep_cnt, h, l, prob*(1-p));
    }
    return ret;
}

int main(){
    int k;
    long double r,l;
    scanf("%d %Lf %Lf %Lf %Lf %Lf", &k,&r,&l,&p,&e,&t);
    printf("%.12Lf\n", search(k, r, l, 1.0));
}
