#include <iostream>
#include <cstdio>

using namespace std;

const double EPS = 1e-11;

int K;
double R, L, P, E, T;

double calc(double l, double r, int k, double p){
  if(T-E-EPS < l && r < T+E+EPS) return p;
  if(l < T-E-EPS && r < T-E-EPS) return 0.0;
  if(l > T+E+EPS && r > T+E+EPS) return 0.0;
  double h = (r + l) / 2.0;
  if(k >= K) return (T-E-EPS < h && h < T+E+EPS ? p : 0.0);
  double res = 0.0;
  if(h < T){
    res += calc(h, r, k+1, p * (1-P));
    res += calc(l, h, k+1, p * P);
  }else{
    res += calc(l, h, k+1, p * (1-P));
    res += calc(h, r, k+1, p * P);
  }
  return res;
}

int main(){
  cin >> K >> L >> R >> P >> E >> T;
  printf("%.6f\n", calc(L, R, 0, 1.0));
}