#include <cstdio>
#include <cstring>
#include <iostream>
#include <iomanip>

typedef long double Double;

const Double EPS = 1E-10;

int sgn(Double x) {
	return x < -EPS ? -1 : x > EPS;
}

int step, lower, upper;
Double p, e, t;

Double solve(Double a, Double b, Double x, int depth) {
	if (sgn(b - x) <= 0) {
		return 1;
	}
	if (sgn(a - x) > 0) {
		return 0;
	}
	if (depth == 0) {
		Double h = (a + b) / 2;
		return sgn(h - x) <= 0 ? 1 : 0;
	}
	
	Double result = 1;
	Double m = (a + b) / 2;
	if (sgn(m - t) > 0) {
		result = p * solve(a, m, x, depth - 1) + (1 - p) * solve(m, b, x, depth - 1);
	} else {
		result = p * solve(m, b, x, depth - 1) + (1 - p) * solve(a, m, x, depth - 1);
	}
	return result;
}

int main() {
	std::cin >> step >> lower >> upper >> p >> e >> t;
	p = 1 - p;
	std::cout << std::setprecision(8) << std::fixed << solve(lower, upper, t + e, step) - solve(lower, upper, t - e, step) << std::endl;
	return 0;
}