#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;

const double EPS = 1e-10;

ll K;
double R, L, P, E, T;

double dfs(ll k, double l, double r) {
  double h = (r + l) / 2;

  if(k == K) {
    return abs(h - T) < E + EPS ? 1 : 0;
  }

  double ret = 0;
  if(h > T - EPS) {
    ret += P * dfs(k + 1, h, r);
    ret += (1 - P) * dfs(k + 1, l, h);
  } else {
    ret += P * dfs(k + 1, l, h);
    ret += (1 - P) * dfs(k + 1, h, r);
  }
  return ret;
}

int main(void) {
  cin >> K >> L >> R >> P >> E >> T;
  printf("%.15lf\n", dfs(0, L, R));
}
