//#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define int ll
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#ifdef int
const ll INF = (1LL<<60);
#else
const int INF = (1LL<<30);
#endif
const double PI = 3.14159265359;
const double EPS = 1e-12;
const int MOD = 1000000007;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

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

double dfs(double r, double l, int k) {
  // [l, r] ??? [t-e, t+e] ?????????????????????????????°
  if(l < t - e || r > t + e) return 0;
  // K??????
  if(k == K) {
    // ???????????????e??\?????????ok
    if(abs((r+l)/2 - t) <= e) return 1;
    else return 0;
  }
  // [l, r]???[t-e, t+e]???????????????????????£????????°
  if(l <= t+e && t-e <= r) return 1;
  double ret;
  if((l+r)/2 >= t) ret = (1-p) * dfs(r, (r+l)/2, k+1) + p * dfs((r+l)/2, l, k+1);
  else ret = p * dfs(r, (r+l)/2, k+1) + (1-p) * dfs((l+r)/2, l, k+1);

  return ret;
}

signed main(void)
{
  cin >> K >> R >> L >> p >> e >> t;
  cout << fixed << setprecision(9) << dfs(R, L, 0) << endl;

  return 0;
}