#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
#define EPS (1e-10)
int K;
double R,L;
double P,E,T;
double Q;

double rec(int depth,double l,double r){
  double m=(l+r)/2.0;
  if(depth==K)return ((T-E<=m&&m<=T+E)?1:0);
  if(r<T-E || T+E<l)return 0;
  if(T-E-EPS<l && r<T+E+EPS)return 1;
  double A=rec(depth+1,l,m);
  double B=rec(depth+1,m,r);
  if(m>=T)return A*Q+B*P;
  else return A*P+B*Q;
}

int main(){
  while(cin>>K>>R>>L){
    cin>>P>>E>>T;
    Q=1.0-P;
    printf("%.10f\n",rec(0,R,L));
  }
  return 0;
}