#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;

double p, e, t;

double dfs(int k, double x, double lt, double rt){
	if(max(abs(lt - t), abs(rt - t)) <= e){
		return x;
	}
	if(max(lt, rt) <= t - e || min(lt, rt) >= t + e){
		return 0,0;
	}

	double h = 0.5 * (lt + rt);
	if(k > 0){
		double q = (h > t ? 1.0 - p : p);
		double ret = dfs(k - 1, x * q, lt, h) + dfs(k - 1, x * (1.0 - q), h, rt);
		return ret;
	}
	else if(abs(h - t) <= e){
		return x;
	}
	return 0.0;
}

int main(){
	int k, r, l;
	scanf("%d%d%d%lf%lf%lf", &k, &l, &r, &p, &e, &t);
	printf("%f\n", dfs(k, 1.0, l, r));
}