#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int Scan() {
  int res = 0, ch, flag = 0;
  if ((ch = getchar()) == '-')
    flag = 1;
  else if (ch >= '0' && ch <= '9')
    res = ch - '0';
  while ((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + ch - '0';
  return flag ? -res : res;
}
int x[2005];
int sz[2][2005];
int n, h;
double p;
double dp[2005][2005][2][2];
void init() {
  for (int i = 1; i <= n; i++) {
    sz[0][i] = i;
    for (int j = i; j >= 2; j--) {
      if (x[j] - x[j - 1] < h)
        sz[0][i] = j - 1;
      else
        break;
    }
  }
  for (int i = 1; i <= n; i++) {
    sz[1][i] = i;
    for (int j = i; j < n; j++) {
      if (x[j + 1] - x[j] < h)
        sz[1][i] = j + 1;
      else
        break;
    }
  }
  for (int i = 0; i < 2005; i++)
    for (int j = 0; j < 2005; j++)
      for (int k1 = 0; k1 < 2; k1++)
        for (int k2 = 0; k2 < 2; k2++) dp[i][j][k1][k2] = -1;
}
double solve(int l, int r, int b1, int b2) {
  if (l > r) return 0;
  if (dp[l][r][b1][b2] != -1) return dp[l][r][b1][b2];
  double ans = 0;
  int n1 = min(r, sz[1][l]);
  if (n1 == r) {
    if (b2 == 0) {
      ans += (1 - p) * (min(h, x[r + 1] - x[r] - h) + x[r] - x[l]);
    } else
      ans += (1 - p) * (min(h, x[r + 1] - x[r]) + x[r] - x[l]);
  } else {
    ans += (1 - p) * (h + x[n1] - x[l] + solve(n1 + 1, r, 1, b2));
  }
  if (b1 == 1)
    ans += p * min(h, x[l] - x[l - 1] - h);
  else
    ans += p * min(h, x[l] - x[l - 1]);
  ans += p * solve(l + 1, r, 0, b2);
  int n2 = max(l, sz[0][r]);
  if (n2 == l) {
    if (b1 == 1)
      ans += p * (min(h, x[l] - x[l - 1] - h) + x[r] - x[l]);
    else
      ans += p * (min(h, x[l] - x[l - 1]) + x[r] - x[l]);
  } else {
    ans += p * (x[r] - x[n2] + h + solve(l, n2 - 1, b1, 0));
  }
  if (b2 == 0)
    ans += (1 - p) * min(h, x[r + 1] - x[r] - h);
  else
    ans += (1 - p) * min(h, x[r + 1] - x[r]);
  ans += (1 - p) * solve(l, r - 1, b1, 1);
  dp[l][r][b1][b2] = ans / 2.0;
  return dp[l][r][b1][b2];
}
int main() {
  cin >> n >> h;
  scanf("%lf", &p);
  memset((x), 0, sizeof((x)));
  memset((sz), 0, sizeof((sz)));
  for (int i = 1; i <= n; i++) cin >> x[i];
  sort(x + 1, x + n + 1);
  x[n + 1] = 1000000000;
  x[0] = -1000000000;
  init();
  double ans = solve(1, n, 0, 1);
  printf("%.9lf", ans);
  return 0;
}
