#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int MAXN = 2002;
int n, m, h;
int x[MAXN];
double p;
double d[MAXN][MAXN][2][2];
int was[MAXN][MAXN][2][2];
int lef[MAXN], righ[MAXN];
double fun(int l, int r, int lq, int rq) {
  if (l > r) return 0.0;
  if (was[l][r][lq][rq]) return d[l][r][lq][rq];
  was[l][r][lq][rq] = 1;
  double ans = 0;
  int s = 0, ll = l - 1, rr = r + 1;
  if (lq)
    s = min(h, (x[l] - x[l - 1] - h));
  else
    s = min(h, x[l] - x[l - 1]);
  ans += (1 / (double)min(r - l + 1, 2)) * p * (s + fun(l + 1, r, 0, rq));
  s = 0;
  if (!rq)
    s = min(h, (x[r + 1] - x[r] - h));
  else
    s = min(h, x[r + 1] - x[r]);
  ans += (1 / (double)min(r - l + 1, 2)) * (1 - p) * (s + fun(l, r - 1, lq, 1));
  if (l != r) {
    int rr = min(r, righ[l]);
    s = 0;
    if (rr == r) {
      s = x[rr] - x[l];
      if (!rq)
        s += min(h, (x[r + 1] - x[r] - h));
      else
        s += min(h, x[r + 1] - x[r]);
    } else {
      s = x[rr] - x[l] + h;
    }
    ans += 0.5 * (1 - p) * (s + fun(rr + 1, r, 1, rq));
    s = 0;
    int ll = max(l, lef[r]);
    if (ll == l) {
      s = x[r] - x[l];
      if (lq)
        s += min(h, (x[l] - x[l - 1] - h));
      else
        s += min(h, x[l] - x[l - 1]);
    } else {
      s = x[r] - x[ll] + h;
    }
    ans += 0.5 * p * (s + fun(l, ll - 1, lq, 0));
  }
  return d[l][r][lq][rq] = ans;
}
void solve() {
  cin >> n >> h >> p;
  x[0] = -1e9;
  x[n + 1] = 1e9;
  for (int i = 1; i <= n; ++i) cin >> x[i];
  sort(x, x + n + 2);
  for (int i = 1; i <= n; ++i) {
    if (x[i] - x[i - 1] < h)
      lef[i] = lef[i - 1];
    else
      lef[i] = i;
  }
  for (int i = n; i >= 1; --i) {
    if (x[i + 1] - x[i] < h)
      righ[i] = righ[i + 1];
    else
      righ[i] = i;
  }
  cout.precision(8);
  cout << fixed << fun(1, n, 0, 1);
}
int main() {
  srand(1337);
  solve();
  return 0;
}
