#include <bits/stdc++.h>
using namespace std;
deque<int> x;
bool vs[2002][2][2002][2];
double pd[2002][2][2002][2];
int nr[2002];
int nl[2002];
double p;
int h, n;
double solve(int l, bool lf, int r, bool rf) {
  if (l > r) {
    return 0;
  }
  double& ans = pd[l][lf][r][rf];
  bool& vis = vs[l][lf][r][rf];
  if (vis) {
    return ans;
  }
  vis = true;
  ans += 0.5 * p *
         (min(h, x[l] - x[l - 1] - (lf ? h : 0)) + solve(l + 1, 0, r, rf));
  if (nr[l] < r) {
    ans += 0.5 * (1 - p) * (x[nr[l]] - x[l] + h + solve(nr[l] + 1, 1, r, rf));
  } else {
    ans +=
        0.5 * (1 - p) * (x[r] - x[l] + min(h, x[r + 1] - x[r] - (rf ? h : 0)));
  }
  ans += 0.5 * (1 - p) *
         (min(h, x[r + 1] - x[r] - (rf ? h : 0)) + solve(l, lf, r - 1, 0));
  if (nl[r] > l) {
    ans += 0.5 * p * (x[r] - x[nl[r]] + h + solve(l, lf, nl[r] - 1, 1));
  } else {
    ans += 0.5 * p * (x[r] - x[l] + min(h, x[l] - x[l - 1] - (lf ? h : 0)));
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> h >> p;
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    x.push_back(v);
  }
  sort(x.begin(), x.end());
  x.push_front(x[0] - h);
  x.push_back(x.back() + h);
  for (int i = n; i > 0; --i) {
    nr[i] = (x[i + 1] - x[i] >= h) ? i : nr[i + 1];
  }
  for (int i = 1; i <= n; ++i) {
    nl[i] = (x[i] - x[i - 1] >= h) ? i : nl[i - 1];
  }
  cout << fixed << setprecision(20) << solve(1, 0, n, 0) << endl;
  return 0;
}
