#include <bits/stdc++.h>
using namespace std;
int x[2005];
double dp[2005][2005][2][2];
bool vis[2005][2005][2][2];
int n;
double p, h;
int dl[2005], dr[2005];
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;
  vis[l][r][f1][f2] = true;
  double ans = dp[l][r][f1][f2];
  ans += p * 0.5 * ((min(h, x[l] - x[l - 1] - f1 * h)) + dfs(l + 1, r, 0, f2));
  ans += (1 - p) * 0.5 *
         ((min(h, x[r + 1] - x[r] - f2 * h)) + dfs(l, r - 1, f1, 0));
  int R = dr[l];
  if (R < r)
    ans += (1 - p) * 0.5 * (x[R] - x[l] + h + dfs(R + 1, r, 1, f2));
  else
    ans += (1 - p) * 0.5 * (x[r] - x[l] + min(h, x[r + 1] - x[r] - f2 * h));
  int L = dl[r];
  if (L > l)
    ans += p * 0.5 * (x[r] - x[L] + h + dfs(l, L - 1, f1, 1));
  else
    ans += p * 0.5 * (x[r] - x[l] + min(h, x[l] - x[l - 1] - f1 * h));
  dp[l][r][f1][f2] = ans;
  return ans;
}
int main() {
  scanf("%d%lf%lf", &n, &h, &p);
  for (int i = 1; i <= n; ++i) scanf("%d", &x[i]);
  sort(x + 1, x + n + 1);
  x[n + 1] = 0x3f3f3f3f;
  x[0] = -0x3f3f3f3f;
  dl[1] = 1;
  dr[n] = n;
  for (int i = 2; i <= n; ++i)
    if (x[i] - x[i - 1] < h)
      dl[i] = dl[i - 1];
    else
      dl[i] = i;
  for (int i = n - 1; i >= 1; --i)
    if (x[i + 1] - x[i] < h)
      dr[i] = dr[i + 1];
    else
      dr[i] = i;
  printf("%.9lf\n", dfs(1, n, 0, 0));
  return 0;
}
