#include<iostream>
#include<cstdio>

using namespace std;

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

double p, e, t;

double solve(int k, double r, double l) {
  if (k == 0) {
    double m = (r + l) / 2;
    if (t - e < m && m < t + e) return 1;
    return 0;
  }
  if (t + e < r) return 0;
  if (l < t - e) return 0;
  if (t - e < r && l < t + e) return 1;
  double m = (r + l) / 2;
  if (m < t) {
    return solve(k - 1, r, m) * p + solve(k - 1, m, l) * (1 - p);
  } else {
    return solve(k - 1, r, m) * (1 - p) + solve(k - 1, m, l) * p;  
  }
}

int main() {
  int k, r, l;
  cin >> k >> r >> l >> p >> e >> t;
  printf("%.12f\n", solve(k, r, l));
}