#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, w = 0;
  char ch = getchar();
  while (!isdigit(ch)) w |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return w ? -x : x;
}
long long loc[2007], dl[2007], dr[2007], h, n;
double f[2007][2007][2][2], p, q;
double dfs(long long l, long long r, long long x, long long y) {
  if (l > r) return 0;
  if (f[l][r][x][y] != -1) return f[l][r][x][y];
  double res = 0, L = min(h, loc[l] - loc[l - 1] - x * h),
         R = min(h, loc[r + 1] - loc[r] - (!y) * h);
  res += 0.5 * p * (dfs(l + 1, r, 0, y) + L);
  res += 0.5 * q * (dfs(l, r - 1, x, 1) + R);
  if (dl[r] <= l)
    res += 0.5 * p * (loc[r] - loc[l] + L);
  else
    res += 0.5 * p * (dfs(l, dl[r] - 1, x, 0) + loc[r] - loc[dl[r]] + h);
  if (dr[l] >= r)
    res += 0.5 * q * (loc[r] - loc[l] + R);
  else
    res += 0.5 * q * (dfs(dr[l] + 1, r, 1, y) + loc[dr[l]] - loc[l] + h);
  return f[l][r][x][y] = res;
}
signed main() {
  n = read();
  cin >> h >> p;
  q = 1 - p;
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= n; ++j)
      for (long long x = 0; x < 2; ++x)
        for (long long y = 0; y < 2; ++y) f[i][j][x][y] = -1.0;
  for (long long i = 1; i <= n; ++i) loc[i] = read();
  sort(loc + 1, loc + 1 + n);
  loc[0] = -0x3f3f3f3f;
  loc[n + 1] = 0x3f3f3f3f;
  dl[1] = 1;
  for (long long i = 2; i <= n; ++i)
    if (loc[i] - loc[i - 1] < h)
      dl[i] = dl[i - 1];
    else
      dl[i] = i;
  dr[n] = n;
  for (long long i = n - 1; i; --i)
    if (loc[i + 1] - loc[i] < h)
      dr[i] = dr[i + 1];
    else
      dr[i] = i;
  printf("%.9lf\n", dfs(1, n, 0, 1));
}
