#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
double L,R,ans;
double p,e,t;
const double eps=1e-10;
void dfs(int k,double l,double r,double cur)
{
	if(k==0)
	{
		double mid=(l+r)/2;
		if(L-eps<mid&&mid<R+eps)
		{
		//cout <<k<<" "<<l<<" "<<r<<" mid:"<<mid<<" "<<l<<" "<<r<<" "<<cur<<endl;
			ans+=cur;
		}
	}
	else if(L-eps<l&&r<R+eps)
	{
		//cout <<k<<" "<<l<<" "<<r<<" "<<l<<" "<<r<<" "<<cur<<endl;
		ans+=cur;
	}
	else
	{
		double mid=(l+r)/2;
		if(L-eps<mid)
		{
			if(mid>t-eps)dfs(k-1,l,mid,cur*(1-p));
			else dfs(k-1,l,mid,cur*p);
		}
		if(R+eps>mid)
		{
			if(mid>t-eps)dfs(k-1,mid,r,cur*p);
			else dfs(k-1,mid,r,cur*(1-p));	
		}
	}
}
int main()
{
	int k,r,l;
	ans=0;
	scanf("%d%d%d",&k,&r,&l);
	scanf("%lf%lf%lf",&p,&e,&t);
	L=t-e;
	R=t+e;
	dfs(k,r,l,1);
	printf("%.9f\n",ans);
	return 0;
}