#include <bits/stdc++.h>
const char en = '\n';
using namespace std;
vector<long long> R(2000 + 47, 0), L(2000 + 47, 0);
long long n, h;
long double p;
vector<long long> V;
long double M[2047][2047][2][2];
long double r(long long z, long long k, bool zz, bool kk) {
  if (z > k) return 0;
  if (M[z][k][zz][kk] > -1) return M[z][k][zz][kk];
  long double res = 0;
  int zvali_sa_po = max(L[k], z);
  long long dlzka = V[k] - V[zvali_sa_po] +
                    min(h, (V[zvali_sa_po] - V[zvali_sa_po - 1] -
                            (zvali_sa_po == z) * zz * h));
  res += 0.5 * p * (dlzka + r(z, zvali_sa_po - 1, zz, 1));
  res +=
      0.5 * (1 - p) * (min(h, V[k + 1] - V[k] - kk * h) + r(z, k - 1, zz, 0));
  int zvali_sa_do = min(k, R[z]);
  dlzka =
      V[zvali_sa_do] - V[z] +
      min(h, V[zvali_sa_do + 1] - V[zvali_sa_do] - (zvali_sa_do == k) * kk * h);
  res += 0.5 * (1 - p) * (dlzka + r(zvali_sa_do + 1, k, 1, kk));
  res += 0.5 * p * (min(h, V[z] - V[z - 1] - zz * h) + r(z + 1, k, 0, kk));
  M[z][k][zz][kk] = res;
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> h >> p;
  for (int i = 1; i <= n; i++) {
    int t;
    cin >> t;
    V.push_back(t);
  }
  V.push_back(-1000000000);
  V.push_back(1000000000);
  sort(V.begin(), V.end());
  for (int i = 1; i <= n; i++) {
    if (V[i] - V[i - 1] < h)
      L[i] = L[i - 1];
    else
      L[i] = i;
  }
  for (int i = n; i > 0; i--) {
    if (V[i + 1] - V[i] < h)
      R[i] = R[i + 1];
    else
      R[i] = i;
  }
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++)
      for (int ii = 0; ii < 2; ii++)
        for (int jj = 0; jj < 2; jj++) M[i][j][ii][jj] = -2;
  cout << setprecision(10) << fixed << r(1, n, 0, 0) << endl;
}
