#include <cstdio>
#include <algorithm>
using namespace std;

int k, R, L;
double p, e, t;

const double EPS = 1e-10;

inline double ABS(double a){
  return a > 0.0 ? a : -a;
}

double search(int n, double l, double r){
  double tt = (l + r) / 2;

  if(n == k){
    if(ABS(tt - t) < e + EPS) return 1.0;
    else return 0.0;
  }

  if(t + e < l + EPS || t - e + EPS > r){
    return 0.0;
  }
  if(t - e + EPS < l && t + e > r + EPS){
    //printf("t:%.2f e: %.2f l:%.2f r:%.2f\n", t, e, l, r);
    return 1.0;
  }

  if(tt + EPS > t){
    //printf("%.1f %.1f: big\n", l, r);
    return (1.0 - p) * search(n+1, l, tt) + p * search(n+1, tt, r);
  }else{
    //printf("%.1f %.1f: small\n", l, r);
    return (1.0 - p) * search(n+1, tt, r) + p * search(n+1, l, tt);
  }
}

int main(){
  scanf("%d%d%d", &k, &L, &R);
  scanf("%lf%lf%lf", &p, &e, &t);

  double ans = search(0, L, R);

  printf("%.6f\n", ans);

  return 0;
}