#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
const int inf=1e8;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
int n;
double r,l,p,e,t;
double f(int q,double a,double b){
	double h=(a+b)/2.0;
	if(q==0){
		if(t-e<h+EPS&&h<t+e+EPS)return 1;
		else return 0;
	}else if(t+e<a||b<t-e)return 0;
	else if(t-e<a&&b<t+e)return 1;
	if(t<=h)return p*f(q-1,a,h)+(1-p)*f(q-1,h,b);
	else return (1-p)*f(q-1,a,h)+p*f(q-1,h,b);
}
int main(){
	cin>>n>>l>>r>>p>>e>>t;
	p=1-p;
	printf("%.8f\n",f(n,l,r));
}