#include<bits/stdc++.h>
using namespace std;

#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define pb push_back
#define fi first
#define se second
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

int in(){
    double t;
    scanf("%lf",&t);
    return t*(1ll<<50);
}

int K,L,R;
double P;
int E,T;

int w;
int sl,sr;

double dfs(double p,int k,int l,int r){
    if(k==K){
        int m=(l+r)/2;
        if(T-E<=m&&m<=T+E)return p;
        else return 0.0;
    }
    int tl=l+w,tr=r-w;
    if(tr<sl||sr<tl)return 0.0;
    if(sl<=tl&&tr<=sr)return p;
    int m=(l+r)/2;
    if(m>=T)return dfs(p*(1-P),k+1,l,m)+dfs(p*P,k+1,m,r);
    else return dfs(p*P,k+1,l,m)+dfs(p*(1-P),k+1,m,r);
}

signed main(){
    scanf("%lld",&K);
    L=in();R=in();
    scanf("%lf",&P);
    E=in();T=in();

    w=L-R;
    rep(i,K+1)w/=2;
    sl=T-E;
    sr=T+E;

    printf("%.20f\n",dfs(1.0,0,L,R));
    return 0;
}