#include <bits/stdc++.h>
using namespace std;
const int N = 2010, INF = 1e9 + 10;
int n, h;
double p;
int x[N], pre[N], nxt[N];
bool vis[N][N][2][2];
double f[N][N][2][2];
double dfs(int i, int j, int f1, int f2) {
  if (i > j) return 0;
  if (vis[i][j][f1][f2]) return f[i][j][f1][f2];
  vis[i][j][f1][f2] = 1;
  int l = f1 ? x[i - 1] + h : x[i - 1];
  int r = f2 ? x[j + 1] - h : x[j + 1];
  double &ret = f[i][j][f1][f2];
  ret = 0;
  ret += 0.5 * p * (x[i] - max(x[i] - h, l) + dfs(i + 1, j, 0, f2));
  int t = min(nxt[i], j + 1);
  ret += 0.5 * (1 - p) * (min(r, x[t - 1] + h) - x[i] + dfs(t, j, 1, f2));
  t = max(i - 1, pre[j]);
  ret += 0.5 * p * (x[j] - max(x[t + 1] - h, l) + dfs(i, t, f1, 1));
  ret += 0.5 * (1 - p) * (min(x[j] + h, r) - x[j] + dfs(i, j - 1, f1, 0));
  return ret;
}
int main() {
  scanf("%d%d", &n, &h);
  scanf("%lf", &p);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", x + i);
  }
  x[0] = -INF;
  x[n + 1] = INF;
  sort(x + 1, x + n + 1);
  pre[1] = 0;
  for (int i = 2; i <= n; ++i) {
    if (x[i] - h < x[i - 1])
      pre[i] = pre[i - 1];
    else
      pre[i] = i - 1;
  }
  nxt[n] = n + 1;
  for (int i = n - 1; i >= 1; --i) {
    if (x[i] + h > x[i + 1])
      nxt[i] = nxt[i + 1];
    else
      nxt[i] = i + 1;
  }
  printf("%.10f\n", dfs(1, n, 0, 0));
  return 0;
}
