#include <iostream>
#include <cstdio>
#include <vector>
#include <complex>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <cstring>
#include <stack>
#include <cmath>
#include <iomanip>
#include <sstream>
#include <cassert>

using namespace std;

typedef long long ll;
typedef ll li;
typedef pair<int,int> PI;
#define EPS (1e-10L)
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define REP(i, n) rep (i, n)
#define F first
#define S second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SZ(a) (int)((a).size())
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset((a),0,sizeof(a))
#define FOR(it,a) for(__typeof(a.begin())it=a.begin();it!=a.end();++it)
void pkuassert(bool t){t=1/t;};
int dx[]={0,1,0,-1,1,1,-1,-1};
int dy[]={1,0,-1,0,-1,1,1,-1};

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

double rec(int d,double l,double r,double p){
  if(d==K){
    double h=(l+r)/2;
    if(T-E<=h && h<=T+E) return p;
    return 0;
  }
  //cout << d << ' ' << l << ' ' << r << ' ' << p << endl;
  if(r<T-E || T+E<l) return 0;
  if(T-E <=l && r<=T+E) return p;

  double n=P;
  if((l+r)/2>=T) n=1-P;
  
  return
    rec(d+1,l,(l+r)/2,p*n)+rec(d+1,(l+r)/2,r,p*(1-n));
}

int main(int argc, char *argv[])
{
  cin >> K >> L >> R;
  cin >> P >> E >> T;

  printf("%.8f\n",rec(0,L,R,1));
  
  return 0;
}