#include <bits/stdc++.h>
using namespace std;
const int N = 2050;
long double x[N], h, p, R[N], L[N], dp[N][N][2][2];
int n;
long double cnt(int l, int r, int xx, int yy) {
  if (dp[l][r][xx][yy]) return dp[l][r][xx][yy];
  if (l > r) return 0;
  long double result = 0;
  int newl = R[l];
  int newr = L[r];
  result += p * 0.5 * (min(h, x[l] - x[l - 1] - xx * h) + cnt(l + 1, r, 0, yy));
  result +=
      (1 - p) * 0.5 * (min(h, x[r + 1] - x[r] - yy * h) + cnt(l, r - 1, xx, 0));
  if (newr <= l)
    result += p * 0.5 * (x[r] - x[l] + min(h, x[l] - x[l - 1] - xx * h));
  else
    result += p * 0.5 * (x[r] - x[newr] + h + cnt(l, newr - 1, xx, 1));
  if (newl >= r)
    result += (1 - p) * 0.5 * (x[r] - x[l] + min(h, x[r + 1] - x[r] - yy * h));
  else
    result += (1 - p) * 0.5 * (x[newl] - x[l] + h + cnt(newl + 1, r, 1, yy));
  dp[l][r][xx][yy] = result;
  return result;
}
int main() {
  cin >> n >> h >> p;
  for (int i = 1; i <= n; ++i) {
    cin >> x[i];
  }
  sort(x + 1, x + n + 1);
  x[n + 1] = 1e9;
  x[0] = -1e9;
  R[n] = n;
  for (int i = n - 1; i >= 1; --i) {
    if (x[i + 1] - x[i] < h)
      R[i] = R[i + 1];
    else
      R[i] = i;
  }
  L[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (x[i] - x[i - 1] < h)
      L[i] = L[i - 1];
    else
      L[i] = i;
  }
  cout << fixed << setprecision(10) << cnt(1, n, 0, 0) << '\n';
  return 0;
}
