#include<cmath>
#include<cstdio>

using namespace std;

const double EPS=1e-11;

double p,e,t;

double dfs(int k,double l,double r){
	double h=(l+r)/2;

	if(t+EPS<l-e || r+e<t-EPS) return 0;
	if(t-e<l+EPS && r-EPS<t+e) return 1;
	if(k==0) return (abs(h-t)<e+EPS)?1:0;

	if(h<t) return (1-p)*dfs(k-1,h,r)+  p  *dfs(k-1,l,h);
	else    return   p  *dfs(k-1,h,r)+(1-p)*dfs(k-1,l,h);
}

int main(){
	int k,l,r; scanf("%d%d%d%lf%lf%lf",&k,&l,&r,&p,&e,&t);

	printf("%.9f\n",dfs(k,l,r));

	return 0;
}