//18
#include<iostream>
#include<cmath>

using namespace std;

double r,l,p,e,t;

double dfs(int k,double r,double l){
  if(k==0){
    return fabs((r+l)/2-t)<=e;
  }else if(t+e<r||l<t-e){
    return 0;
  }else if(t-e<=r&&l<=t+e){
    return 1;
  }else{
    double h=(r+l)/2;
    double hp=(h>t)?p:1-p;
    return dfs(k-1,h,l)*hp+dfs(k-1,r,h)*(1-hp);
  }
}

int main(){
  int k;
  double r,l;
  cin>>k>>r>>l>>p>>e>>t;
  cout.precision(5);
  cout<<fixed<<dfs(k,r,l)<<endl;
  return 0;
}
  