#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int INFTY = 1 << 30;
int N, H;
double P;
int pos[MAXN];
int L[MAXN], R[MAXN];
double dp[MAXN][MAXN][2][2];
double getdp(int left, int right, int a, int b) {
  if (left > right) return 0;
  if (dp[left][right][a][b] != -1) return dp[left][right][a][b];
  double& ret = dp[left][right][a][b];
  ret = 0;
  int idx, endpt;
  endpt = max(a ? (pos[left - 1] + H) : pos[left - 1], pos[left] - H);
  ret += 0.5 * P * (pos[left] - endpt + getdp(left + 1, right, 0, b));
  idx = min(left + R[left] - 1, right);
  endpt = min(b ? pos[right + 1] : (pos[right + 1] - H), pos[idx] + H);
  ret +=
      0.5 * (1 - P) * (endpt - pos[left] + getdp(left + R[left], right, 1, b));
  endpt = min(b ? pos[right + 1] : (pos[right + 1] - H), pos[right] + H);
  ret += 0.5 * (1 - P) * (endpt - pos[right] + getdp(left, right - 1, a, 1));
  idx = max(right - L[right] + 1, left);
  endpt = max(a ? (pos[left - 1] + H) : pos[left - 1], pos[idx] - H);
  ret += 0.5 * P * (pos[right] - endpt + getdp(left, right - L[right], a, 0));
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> N >> H >> P;
  for (int i = 1; i <= N; i++) cin >> pos[i];
  pos[0] = -INFTY;
  pos[N + 1] = INFTY;
  N += 2;
  sort(pos, pos + N);
  L[0] = 1;
  for (int i = 1; i < N; i++) {
    if (pos[i] - pos[i - 1] < H)
      L[i] = L[i - 1] + 1;
    else
      L[i] = 1;
  }
  R[N - 1] = 1;
  for (int i = N - 2; i >= 0; i--) {
    if (pos[i + 1] - pos[i] < H)
      R[i] = R[i + 1] + 1;
    else
      R[i] = 1;
  }
  for (int i = 0; i < MAXN; i++)
    for (int j = 0; j < MAXN; j++)
      for (int a = 0; a < 2; a++)
        for (int b = 0; b < 2; b++) dp[i][j][a][b] = -1;
  printf("%.10f\n", getdp(1, N - 2, 0, 1));
  return 0;
}
