#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int m;
int n;
double p;
int h;
int x[2500];
double table[2100][2100][2][2];
int was[2100][2100][2][2];
int nextl[2100];
int nextr[2100];
double getans(int l, int r, int f1, int f2) {
  if (l > r) return 0;
  double &ans = table[l][r][f1][f2];
  if (was[l][r][f1][f2]) return ans;
  was[l][r][f1][f2] = 1;
  int xl = l ? (f1 ? x[l - 1] + h : x[l - 1]) : -1e9;
  int xr = r == n - 1 ? 1e9 : (f2 ? x[r + 1] - h : x[r + 1]);
  double dl = min(h, x[l] - xl);
  double dr = min(h, xr - x[r]);
  if (l == r) {
    ans = p * dl + (1 - p) * dr;
    return ans;
  }
  ans = (dl + getans(l + 1, r, 0, f2)) * p;
  ans += (dr + getans(l, r - 1, f1, 0)) * (1 - p);
  int pl = nextr[l];
  pl = min(pl, r + 1);
  int pr = nextl[r];
  pr = max(pr, l - 1);
  ans += (min(x[pl - 1] + h, xr) - x[l] + getans(pl, r, 1, f2)) * (1 - p);
  ans += (x[r] - max(x[pr + 1] - h, xl) + getans(l, pr, f1, 1)) * p;
  ans /= 2;
  return ans;
}
int main() {
  cin >> n >> h >> p;
  for (int i = 0; i < (n); i++) cin >> x[i];
  sort(x, x + n);
  for (int i = 0; i < (n); i++) {
    if (i && x[i] - x[i - 1] < h)
      nextl[i] = nextl[i - 1];
    else
      nextl[i] = i - 1;
  }
  for (int i = (n)-1; i >= 0; i--) {
    if (i < n - 1 && x[i + 1] - x[i] < h)
      nextr[i] = nextr[i + 1];
    else
      nextr[i] = i + 1;
  }
  double ans = getans(0, n - 1, 0, 0);
  printf("%.10lf", ans);
  return 0;
}
