#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)

const double EPS = 1.0e-10;
int K;
double UB, LB, P, E, T;
double dfs(double lb, double ub, int turn){
    if(T + E + EPS < lb) return 0.0;
    if(ub < T - E - EPS) return 0.0;
    if(T - E + EPS < lb && ub < T + E - EPS) return 1.0;
    double mid = (lb + ub) / 2;
    if(turn == 0)
      return abs(T - mid) <= (EPS + E) ? 1.0 : 0.0;
    double res = 0.0;
    double p1 = 1.0 - P, p2 = P;
    if((T - EPS) <= mid) swap(p1, p2);
    res += dfs(mid, ub, turn - 1) * p1;
    res += dfs(lb, mid, turn - 1) * p2;
    return res;
}
int main(){
    scanf("%d%lf%lf%lf%lf%lf", &K, &LB, &UB, &P, &E, &T);
    printf("%.10f\n", dfs(LB, UB, K));
    return 0;
}