#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
double dp[N][N][2][2], p;
int L[N], R[N], X[N], h, n;
bool vis[N][N][2][2];
double dpit(int l, int r, int x, int y) {
  int dis;
  bool debug = l == 3 && r == 3;
  if (l > r) return 0;
  if (vis[l][r][x][y]) return dp[l][r][x][y];
  vis[l][r][x][y] = 1;
  double &ret = dp[l][r][x][y];
  int Last = min(R[l], r);
  if (Last == r)
    dis = min(X[Last + 1] - X[Last] - (y == 0 ? h : 0), h);
  else
    dis = h;
  double dpL = (1 - p) * (dpit(R[l] + 1, r, 1, y) + X[Last] - X[l] + dis);
  dpL +=
      p * (dpit(l + 1, r, 0, y) + min(X[l] - X[l - 1] - (x == 1 ? h : 0), h));
  Last = max(L[r], l);
  if (Last == l)
    dis = min(X[Last] - X[Last - 1] - (x == 1 ? h : 0), h);
  else
    dis = h;
  double dpR = p * (dpit(l, L[r] - 1, x, 0) + X[r] - X[Last] + dis);
  dpR += (1 - p) *
         (dpit(l, r - 1, x, 1) + min(X[r + 1] - X[r] - (y == 0 ? h : 0), h));
  ret = (dpL + dpR) / 2;
  return ret;
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  for (int i = 1; i <= n; i++) scanf("%d", X + i);
  sort(X + 1, X + 1 + n);
  X[0] = X[1] - h;
  X[n + 1] = X[n] + h;
  for (int i = 1; i <= n; i++) {
    if (X[i] - X[i - 1] < h)
      L[i] = L[i - 1];
    else
      L[i] = i;
  }
  for (int i = n; i >= 1; i--) {
    if (X[i + 1] - X[i] < h)
      R[i] = R[i + 1];
    else
      R[i] = i;
  }
  printf("%.15f\n", dpit(1, n, 0, 1));
  return 0;
}
