#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
int n;
double p, h;
double dp[N][N][2][2], pos[N];
int ll[N], rr[N];
inline void init() {
  ll[1] = 1;
  for (register int i = 2; i <= n; ++i)
    if (pos[i] - pos[i - 1] < h)
      ll[i] = ll[i - 1];
    else
      ll[i] = i;
  rr[n] = n;
  for (register int i = n - 1; i >= 1; --i)
    if (pos[i + 1] - pos[i] < h)
      rr[i] = rr[i + 1];
    else
      rr[i] = i;
}
double dfs(int l, int r, int x, int y) {
  if (l > r) return 0;
  if (dp[l][r][x][y] != 0) return dp[l][r][x][y];
  double res = 0;
  res += 0.5 * p * (min(pos[l] - pos[l - 1] - x * h, h) + dfs(l + 1, r, 0, y));
  res += 0.5 * (1 - p) *
         (min(pos[r + 1] - pos[r] - y * h, h) + dfs(l, r - 1, x, 0));
  if (rr[l] >= r)
    res +=
        0.5 * (1 - p) * (min(pos[r + 1] - pos[r] - y * h, h) + pos[r] - pos[l]);
  else
    res += 0.5 * (1 - p) * (dfs(rr[l] + 1, r, 1, y) + pos[rr[l]] - pos[l] + h);
  if (ll[r] <= l)
    res += 0.5 * p * (min(pos[l] - pos[l - 1] - x * h, h) + pos[r] - pos[l]);
  else
    res += 0.5 * p * (dfs(l, ll[r] - 1, x, 1) + pos[r] - pos[ll[r]] + h);
  return dp[l][r][x][y] = res;
}
int main() {
  scanf("%d%lf%lf", &n, &h, &p);
  for (register int i = 1; i <= n; ++i) scanf("%lf", &pos[i]);
  sort(pos + 1, pos + n + 1);
  init();
  pos[0] = -10000000000;
  pos[n + 1] = 10000000000;
  printf("%.20lf\n", dfs(1, n, 0, 0));
  return 0;
}
