#include <bits/stdc++.h>
using namespace std;
const int Maxn = 2020;
int n, h;
double p;
int x[Maxn], l[Maxn], r[Maxn];
double dp[Maxn][Maxn][2][2];
double dfs(int L, int R, int lrest, int rrest) {
  double &t = dp[L][R][lrest][rrest];
  if (t >= 0) return t;
  t = 0;
  if (L == R) {
    double t1 = lrest ? min(x[L] - x[L - 1] - h, h) : min(x[L] - x[L - 1], h);
    double t2 = rrest ? min(x[R + 1] - x[R] - h, h) : min(x[R + 1] - x[R], h);
    t = p * t1 + (1 - p) * t2;
    return t;
  }
  t += 0.5 * p *
       (dfs(L + 1, R, 0, rrest) +
        (lrest ? min(x[L] - x[L - 1] - h, h) : min(x[L] - x[L - 1], h)));
  if (r[L] >= R)
    t += 0.5 * (1 - p) *
         (x[R] - x[L] +
          (rrest ? min(x[R + 1] - x[R] - h, h) : min(x[R + 1] - x[R], h)));
  else
    t += 0.5 * (1 - p) * (dfs(r[L] + 1, R, 1, rrest) + x[r[L]] - x[L] + h);
  t += 0.5 * (1 - p) *
       (dfs(L, R - 1, lrest, 0) +
        (rrest ? min(x[R + 1] - x[R] - h, h) : min(x[R + 1] - x[R], h)));
  if (l[R] <= L)
    t += 0.5 * p *
         (x[R] - x[L] +
          (lrest ? min(x[L] - x[L - 1] - h, h) : min(x[L] - x[L - 1], h)));
  else
    t += 0.5 * p * (dfs(L, l[R] - 1, lrest, 1) + x[R] - x[l[R]] + h);
  return t;
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  x[0] = -1e9;
  x[n + 1] = 1e9;
  for (int i = 1; i <= n; i++) scanf("%d", x + i);
  sort(x + 1, x + n + 1);
  l[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (x[i] - x[i - 1] < h)
      l[i] = l[i - 1];
    else
      l[i] = i;
  }
  r[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (x[i + 1] - x[i] < h)
      r[i] = r[i + 1];
    else
      r[i] = i;
  }
  memset(dp, -1, sizeof(dp));
  printf("%.12f\n", dfs(1, n, 0, 0));
}
