#include <bits/stdc++.h>
using namespace std;
int n, h;
int x[2005], pr[2005], nt[2005];
double p;
double dp[2005][2005][2][2];
double calc(int l, int r, bool bl, bool br) {
  if (l > r) return 0;
  double &rlt = dp[l][r][bl][br];
  if (rlt > 0) return rlt;
  int ll = bl ? x[l - 1] + h : x[l - 1];
  int rr = br ? x[r + 1] : x[r + 1] - h;
  if (x[l] < ll) ll = x[l];
  if (rr < x[r]) rr = x[r];
  rlt += p * (calc(l + 1, r, 0, br) + min(h, x[l] - ll));
  if (nt[l] < r)
    rlt += (1 - p) * (calc(nt[l] + 1, r, 1, br) + x[nt[l]] + h - x[l]);
  else
    rlt += (1 - p) * (min(rr, x[r] + h) - x[l]);
  rlt += (1 - p) * (calc(l, r - 1, bl, 1) + min(h, rr - x[r]));
  if (l < pr[r])
    rlt += p * (calc(l, pr[r] - 1, bl, 0) + x[r] - x[pr[r]] + h);
  else
    rlt += p * (x[r] - max(ll, x[l] - h));
  rlt /= 2;
  return rlt;
}
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%d", x + i);
  }
  sort(x + 1, x + n + 1);
  x[0] = -1000000000, x[n + 1] = 1000000000;
  for (int i = 1; i <= n; i++) {
    if (x[i - 1] + h <= x[i])
      pr[i] = i;
    else
      pr[i] = pr[i - 1];
  }
  for (int i = n; i; i--) {
    if (x[i] + h <= x[i + 1])
      nt[i] = i;
    else
      nt[i] = nt[i + 1];
  }
  printf("%.15lf\n", calc(1, n, 0, 1));
}
