#include <bits/stdc++.h>
using namespace std;
int n, h;
double p;
int v[2222];
int tol[2222], tor[2222];
double dp[2222][2222][2][2];
bool vis[2222][2222][2][2];
double dfs(int l, int r, int f1, int f2) {
  if (vis[l][r][f1][f2]) return dp[l][r][f1][f2];
  if (l > r) return 0;
  int h1 = min(h, v[l] - v[l - 1] - f1 * h);
  int h2 = min(h, v[r + 1] - v[r] - f2 * h);
  double ans = 0;
  ans += 0.5 * p * (h1 + dfs(l + 1, r, 0, f2));
  ans += 0.5 * (1 - p) * (h2 + dfs(l, r - 1, f1, 0));
  if (tor[l] >= r)
    ans += 0.5 * (1 - p) * (h2 + (v[r] - v[l]));
  else
    ans += 0.5 * (1 - p) * (h + v[tor[l]] - v[l] + dfs(tor[l] + 1, r, 1, f2));
  if (tol[r] <= l)
    ans += 0.5 * p * (h1 + v[r] - v[l]);
  else
    ans += 0.5 * p * (v[r] - v[tol[r]] + h + dfs(l, tol[r] - 1, f1, 1));
  vis[l][r][f1][f2] = 1;
  return dp[l][r][f1][f2] = ans;
}
int main() {
  scanf("%d%d", &n, &h);
  scanf("%lf", &p);
  v[0] = -0x3f3f3f3f;
  v[n + 1] = 0x3f3f3f3f;
  for (int i = 1; i <= n; i++) scanf("%d", &v[i]);
  sort(v, v + n + 1);
  tol[0] = 0;
  for (int i = 1; i <= 1 + n; i++) {
    if (v[i] - v[i - 1] < h)
      tol[i] = tol[i - 1];
    else
      tol[i] = i;
  }
  for (int i = n; i >= 0; i--) {
    if (v[i + 1] - v[i] < h)
      tor[i] = tor[i + 1];
    else
      tor[i] = i;
  }
  printf("%.13f\n", dfs(1, n, 0, 0));
  return 0;
}
