#include <bits/stdc++.h>
using namespace std;
const int N = 2001;
int n, h, nxtLR[N], nxtRL[N];
long long v[N];
double p, dp[N][N][2][2];
double calc(int i, int j, bool tl, bool tr) {
  if (i > j) return 0;
  double &ret = dp[i][j][tl][tr];
  if (ret == ret) return ret;
  ret = 0;
  if (i == j) {
    long long com = !i ? h : v[i] - v[i - 1];
    if (i && !tl) com -= h;
    com = min(com, (long long)h);
    ret += p * com;
    com = i == n - 1 ? h : v[i + 1] - v[i];
    if (i != n - 1 && !tr) com -= h;
    com = min(com, (long long)h);
    ret += (1 - p) * com;
    return ret;
  }
  int ni = nxtLR[i];
  if (ni <= j)
    ret += 0.5 * (1.0 - p) * (v[ni - 1] - v[i] + h + calc(ni, j, false, tr));
  else {
    long long com = j == n - 1 ? h : v[j + 1] - v[j];
    if (j != n - 1) {
      if (!tr) com -= h;
      com = min(com, (long long)h);
    }
    ret += 0.5 * (1.0 - p) * (v[j] - v[i] + com + calc(ni, j, false, tr));
  }
  long long com = !i ? h : v[i] - v[i - 1];
  if (i && !tl) com -= h;
  com = min(com, (long long)h);
  ret += 0.5 * p * (com + calc(i + 1, j, true, tr));
  int nj = nxtRL[j];
  if (nj >= i)
    ret += 0.5 * p * (v[j] - v[nj + 1] + h + calc(i, nj, tl, false));
  else {
    long long com = i == 0 ? h : v[i] - v[i - 1];
    if (i != 0) {
      if (!tl) com -= h;
      com = min(com, (long long)h);
    }
    ret += 0.5 * p * (v[j] - v[i] + com + calc(i, nj, tl, false));
  }
  com = j + 1 == n ? h : v[j + 1] - v[j];
  if (!tr && j + 1 != n) com -= h;
  com = min(com, (long long)h);
  ret += 0.5 * (1.0 - p) * (com + calc(i, j - 1, tl, true));
  return ret;
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  for (int i = 0; i < n; ++i) scanf("%lld", v + i);
  sort(v, v + n);
  for (int i = 0; i < n; ++i) {
    if (!i || v[i] - v[i - 1] >= h)
      nxtRL[i] = i - 1;
    else
      nxtRL[i] = nxtRL[i - 1];
  }
  for (int i = n - 1; i >= 0; --i) {
    if (i + 1 == n || v[i + 1] - v[i] >= h)
      nxtLR[i] = i + 1;
    else
      nxtLR[i] = nxtLR[i + 1];
  }
  memset(dp, -1, sizeof(dp));
  printf("%.9lf\n", calc(0, n - 1, false, false));
  return 0;
}
