#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 2100;
double f[maxn][maxn][2][2];
int le[maxn];
int ri[maxn];
int a[maxn];
int h, n;
double p;
double dfs(int l, int r, int x, int y) {
  if (l > r) return 0;
  if (f[l][r][x][y] >= 0) return f[l][r][x][y];
  double ll = min(h, a[l] - a[l - 1]);
  if (x == 1) ll = min(1.0 * a[l] - a[l - 1] - h, ll);
  double rr = min(h, a[r + 1] - a[r]);
  if (y == 1) rr = min(1.0 * a[r + 1] - h - a[r], rr);
  f[l][r][x][y] = 0;
  f[l][r][x][y] += 0.5 * p * (dfs(l + 1, r, 0, y) + ll);
  f[l][r][x][y] += 0.5 * (1 - p) * (dfs(l, r - 1, x, 0) + rr);
  int pos = ri[l];
  if (pos > r) pos = r;
  double len;
  if (y == 1)
    len = min(a[pos] + h, a[r + 1] - h) - a[l];
  else
    len = min(a[pos] + h - a[l], a[pos + 1] - a[l]);
  f[l][r][x][y] += 0.5 * (1 - p) * (dfs(pos + 1, r, 1, y) + len);
  pos = le[r];
  if (pos < l) pos = l;
  if (x == 1)
    len = a[r] - max(a[pos] - h, a[l - 1] + h);
  else
    len = min(a[r] - a[pos] + h, a[r] - a[pos - 1]);
  f[l][r][x][y] += 0.5 * p * (dfs(l, pos - 1, x, 1) + len);
  return f[l][r][x][y];
}
int main() {
  scanf("%d%d", &n, &h);
  scanf("%lf", &p);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  le[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] - a[i - 1] < h)
      le[i] = le[i - 1];
    else
      le[i] = i;
  }
  ri[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i + 1] - a[i] < h)
      ri[i] = ri[i + 1];
    else
      ri[i] = i;
  }
  a[0] = -inf;
  a[n + 1] = inf;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      for (int x = 0; x <= 1; x++)
        for (int y = 0; y <= 1; y++) f[i][j][x][y] = -1;
  double ans = dfs(1, n, 0, 0);
  printf("%.10lf\n", ans);
}
