#include <bits/stdc++.h>
using namespace std;
double dp[2020][2020][2][2];
bool vis[2020][2020][2][2];
int n, h, x[2020];
int tor[2020], tol[2020];
double p;
double solve(int l, int r, int fl, int fr) {
  if (vis[l][r][fl][fr]) return dp[l][r][fl][fr];
  dp[l][r][fl][fr] = 0.0;
  vis[l][r][fl][fr] = 1;
  if (l == r) {
    dp[l][r][fl][fr] += p * 1.0 * min(h, x[l] - x[l - 1] - (fl ? h : 0));
    dp[l][r][fl][fr] +=
        (1.0 - p) * 1.0 * min(h, x[r + 1] - x[r] - (fr ? h : 0));
    return dp[l][r][fl][fr];
  }
  double leftlen = 0;
  int rm = min(tor[l], r);
  if (rm < r) {
    leftlen += p * (1.0 * min(h, x[l] - x[l - 1] - (fl ? h : 0)) +
                    solve(l + 1, r, 0, fr));
    leftlen += (1.0 - p) * (x[rm] - x[l] + h + solve(rm + 1, r, 1, fr));
  } else {
    leftlen += p * (1.0 * min(h, x[l] - x[l - 1] - (fl ? h : 0)) +
                    solve(l + 1, r, 0, fr));
    leftlen += (1.0 - p) * (min(x[r] + h, x[r + 1] - (fr ? h : 0)) - x[l]);
  }
  double rightlen = 0;
  int lm = max(tol[r], l);
  if (lm > l) {
    rightlen += p * (x[r] - x[lm] + h + solve(l, lm - 1, fl, 1));
    rightlen += (1.0 - p) * (min(h, x[r + 1] - x[r] - (fr ? h : 0)) +
                             solve(l, r - 1, fl, 0));
  } else {
    rightlen += p * (x[r] - max(x[l] - h, x[l - 1] + (fl ? h : 0)));
    rightlen += (1.0 - p) * (min(h, x[r + 1] - x[r] - (fr ? h : 0)) +
                             solve(l, r - 1, fl, 0));
  }
  dp[l][r][fl][fr] += leftlen * 0.5 + rightlen * 0.5;
  return dp[l][r][fl][fr];
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  x[0] = -0x3f3f3f3f;
  x[n + 1] = 0x3f3f3f3f;
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  sort(x + 1, x + n + 1);
  tol[1] = 1;
  for (int i = 2; i <= n; i++) {
    if ((x[i] - x[i - 1]) < h)
      tol[i] = tol[i - 1];
    else
      tol[i] = i;
  }
  tor[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if ((x[i + 1] - x[i]) < h)
      tor[i] = tor[i + 1];
    else
      tor[i] = i;
  }
  printf("%.10lf\n", solve(1, n, 0, 0));
  return 0;
}
