#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n, h, first[N], l[N], r[N];
double p, q, f[N][N][2][2];
bool check[N][N][2][2];
void read() {
  cin >> n >> h >> p;
  for (int i = 1; i <= n; i++) cin >> first[i];
}
void init() {
  sort(first + 1, first + n + 1);
  first[0] = first[1] - h;
  first[n + 1] = first[n] + h;
  r[n] = n;
  l[1] = 1;
  for (int i = n - 1; i >= 1; i--)
    if (h > first[i + 1] - first[i])
      r[i] = r[i + 1];
    else
      r[i] = i;
  for (int i = 2; i <= n; i++)
    if (first[i] - first[i - 1] < h)
      l[i] = l[i - 1];
    else
      l[i] = i;
  q = 1 - p;
  q /= 2;
  p /= 2;
}
double F(int i, int j, int d, int c) {
  int xmax = first[j + 1] - (1 - c) * h, xmin = first[i - 1] + d * h;
  if (i == j)
    return 2 * (p * min(first[i] - xmin, h) + q * min(xmax - first[i], h));
  double &res = f[i][j][d][c];
  if (check[i][j][d][c]) return res;
  check[i][j][d][c] = 1;
  res = 0;
  if (d == 0)
    res += p * min(first[i] - first[i - 1], h) + p * F(i + 1, j, 0, c);
  else
    res += p * min(first[i] - first[i - 1] - h, h) + p * F(i + 1, j, 0, c);
  if (c == 1)
    res += q * min(first[j + 1] - first[j], h) + q * F(i, j - 1, d, 1);
  else
    res += q * min(first[j + 1] - first[j] - h, h) + q * F(i, j - 1, d, 1);
  if (r[i] < j)
    res += q * (first[r[i]] - first[i] + h) + q * F(r[i] + 1, j, 1, c);
  else
    res += q * min(xmax - first[i], first[r[i]] - first[i] + h);
  if (l[j] > i)
    res += p * (first[j] - first[l[j]] + h) + p * F(i, l[j] - 1, d, 0);
  else
    res += p * min(first[j] - xmin, first[j] - first[l[j]] + h);
  return res;
}
void solve() {
  init();
  cout.precision(7);
  cout << fixed << F(1, n, 0, 1) << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  read();
  solve();
  return 0;
}
