#include <bits/stdc++.h>
using namespace std;
double dp[2005][2005][4], p;
int n, x[2005], h;
int nxtl[2005], nxtr[2005];
double dfs(int l, int r, int op) {
  if (l > r) return 0;
  if (dp[l][r][op]) return dp[l][r][op];
  dp[l][r][op] +=
      0.5 * p *
      (min(x[l] - x[l - 1] - h * (op & 1), h) + dfs(l + 1, r, op & 2));
  if (nxtl[l] <= r)
    dp[l][r][op] +=
        0.5 * (1 - p) * (x[nxtl[l] - 1] - x[l] + h + dfs(nxtl[l], r, op | 1));
  else
    dp[l][r][op] +=
        0.5 * (1 - p) *
        (x[r] - x[l] + min(x[r + 1] - x[r] - h * ((op & 2) != 0), h));
  dp[l][r][op] +=
      0.5 * (1 - p) *
      (min(x[r + 1] - x[r] - h * ((op & 2) != 0), h) + dfs(l, r - 1, op & 1));
  if (nxtr[r] >= l)
    dp[l][r][op] +=
        0.5 * p * (x[r] - x[nxtr[r] + 1] + h + dfs(l, nxtr[r], op | 2));
  else
    dp[l][r][op] +=
        0.5 * p * (x[r] - x[l] + min(x[l] - x[l - 1] - h * (op & 1), h));
  return dp[l][r][op];
}
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] = -1e9, x[n + 1] = 1e9;
  nxtl[n] = n + 1;
  for (int i = n - 1; i >= 1; --i) {
    if (x[i + 1] - x[i] >= h)
      nxtl[i] = i + 1;
    else
      nxtl[i] = nxtl[i + 1];
  }
  nxtr[1] = 0;
  for (int i = 2; i <= n; ++i) {
    if (x[i] - x[i - 1] >= h)
      nxtr[i] = i - 1;
    else
      nxtr[i] = nxtr[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    dp[i][i][0] =
        p * min(x[i] - x[i - 1], h) + (1 - p) * min(x[i + 1] - x[i], h);
    dp[i][i][1] =
        p * min(x[i] - x[i - 1] - h, h) + (1 - p) * min(x[i + 1] - x[i], h);
    dp[i][i][2] =
        p * min(x[i] - x[i - 1], h) + (1 - p) * min(x[i + 1] - x[i] - h, h);
    dp[i][i][3] =
        p * min(x[i] - x[i - 1] - h, h) + (1 - p) * min(x[i + 1] - x[i] - h, h);
  }
  printf("%.8f", dfs(1, n, 0));
  return 0;
}
