#include <cstdio>
#include <cmath>
#include <algorithm>

#define rep(i, n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef long double ld;

int k;
ld r, l, p, e, t;

ld solve(int k, ld r, ld l){
	if(k == 0){
		return fabs((r + l) / 2 - t) <= e;
	}
	if(t + e <= r || l <= t - e){
		return 0;
	}
	if(t - e <= r && l <= t + e){
		return 1;
	}
	ld f = solve(k - 1, r, (r + l) / 2);
	ld g = solve(k - 1, (r + l) / 2, l);
	if((r + l) / 2 >= t){
		return f * (1 - p) + g * p;
	}
	else{
		return f * p + g * (1 - p);
	}
}

int main(){
	scanf("%d%Lf%Lf%Lf%Lf%Lf", &k, &r, &l, &p, &e, &t);
	printf("%Lf\n", solve(k, r, l));
	return 0;
}