#include <bits/stdc++.h>
using namespace std;
bool solved[2003][2003][2][2];
int n, h, X[2003], R[2003], L[2003];
double p, M[2003][2003][2][2];
double DP(int l, int r, bool leftL, bool leftR) {
  if (l > r) return 0;
  if (solved[l][r][leftL][leftR]) return M[l][r][leftL][leftR];
  solved[l][r][leftL][leftR] = true;
  int leftFall = (!l ? h
                     : (leftL ? min(h, X[l] - X[l - 1])
                              : min(h, X[l] - (X[l - 1] + h)))),
      rightFall = (r == n - 1 ? h
                              : (leftR ? min(h, (X[r + 1] - h) - X[r])
                                       : min(h, X[r + 1] - X[r]))),
      rightSegFall, leftSegFall;
  if (R[l] < r)
    rightSegFall = X[R[l]] - X[l] + h;
  else if (r < n - 1)
    rightSegFall =
        min(X[r] - X[l] + h, leftR ? (X[r + 1] - h) - X[l] : X[r + 1] - X[l]);
  else
    rightSegFall = X[r] - X[l] + h;
  if (L[r] > l)
    leftSegFall = X[r] - X[L[r]] + h;
  else if (l > 0)
    leftSegFall =
        min(X[r] - X[l] + h, leftL ? X[r] - X[l - 1] : X[r] - (X[l - 1] + h));
  else
    leftSegFall = X[r] - X[l] + h;
  return M[l][r][leftL][leftR] =
             0.5 * (p * (leftFall + DP(l + 1, r, true, leftR)) +
                    (1 - p) * (rightSegFall + DP(R[l] + 1, r, false, leftR))) +
             0.5 * ((1 - p) * (rightFall + DP(l, r - 1, leftL, false)) +
                    p * (leftSegFall + DP(l, L[r] - 1, leftL, true)));
}
double solve() {
  int i;
  sort(X, X + n);
  R[n - 1] = n - 1;
  for (i = n - 2; i >= 0; --i) R[i] = (X[i + 1] - X[i] < h ? R[i + 1] : i);
  L[0] = 0;
  for (i = 1; i < n; ++i) L[i] = (X[i] - X[i - 1] < h ? L[i - 1] : i);
  return DP(0, n - 1, false, false);
}
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (int i = 0; i < n; ++i) scanf("%d", X + i);
  printf("%.12lf\n", solve());
  return 0;
}
