#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
const double EPS = 1e-12;
 
double P, E, T;

double dfs(double R, double L, int K){
  if(K == 0){
    double T2 = (R + L) / 2;
    if(abs(T2 - T) < EPS + E){
      return 1.0;
    }
    else return 0.0;
  }
  double d1 = max(abs(T - R), abs(T - L));
  double d2 = min(abs(T - R), abs(T - L));

  if(d1 < E + EPS) return 1.0;
  if((T < R || L < T) && d2 > E) return 0.0;
  double m = (R + L) / 2;
 
  if(m < T){
    return (1 - P) * dfs(m, L, K - 1) + P * dfs(R, m, K - 1);
  }else{
    return P * dfs(m, L, K - 1) + (1 - P) * dfs(R, m, K - 1);
  }
}

int main(){
  int K, R, L;
  cin >> K >> R >> L;
  cin >> P >> E >> T;
  cout << fixed << setprecision(12) << dfs(R, L, K) << endl;
  return 0;
}