#include <bits/stdc++.h>
using namespace std;
int n, tree[2005], dcheck[2005][2005][2][2], tl[2005], tr[2005], h;
double dn[2005][2005][2][2], p;
double fun(int b, int e, int ll, int rr) {
  if (b > e) return 0;
  if (dcheck[b][e][ll][rr]) return dn[b][e][ll][rr];
  dcheck[b][e][ll][rr] = 1;
  double resl, resr;
  if (ll)
    resl = p * (min(tree[b] - tree[b - 1], h) + fun(b + 1, e, 1, rr));
  else
    resl = p * (min(tree[b] - tree[b - 1] - h, h) + fun(b + 1, e, 1, rr));
  int lmost = min(tr[b], e);
  if (lmost == e) {
    if (rr)
      resl += (1 - p) * (tree[e] - tree[b] + min(tree[e + 1] - tree[e], h));
    else
      resl += (1 - p) * (tree[e] - tree[b] + min(tree[e + 1] - tree[e] - h, h));
  } else
    resl += (1 - p) * (tree[tr[b]] - tree[b] + h + fun(tr[b] + 1, e, 0, rr));
  if (rr)
    resr = (1 - p) * (min(tree[e + 1] - tree[e], h) + fun(b, e - 1, ll, 1));
  else
    resr = (1 - p) * (min(tree[e + 1] - tree[e] - h, h) + fun(b, e - 1, ll, 1));
  int rmost = max(tl[e], b);
  if (rmost == b) {
    if (ll)
      resr += p * (tree[e] - tree[b] + min(tree[b] - tree[b - 1], h));
    else
      resr += p * (tree[e] - tree[b] + min(tree[b] - tree[b - 1] - h, h));
  } else
    resr += p * (tree[e] - tree[tl[e]] + h + fun(b, tl[e] - 1, ll, 0));
  return dn[b][e][ll][rr] = (resl + resr) / 2;
}
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (int i = 1; i <= n; i++) scanf("%d", &tree[i]);
  sort(tree + 1, tree + 1 + n);
  tree[0] = -1000000000;
  tree[n + 1] = 1000000000;
  int b = 1, e = 1;
  while (b <= n) {
    while (tree[e + 1] - tree[e] < h) e++;
    for (; b <= e; b++) tr[b] = e;
    e++;
  }
  e = n, b = n;
  while (b > 0) {
    while (tree[e] - tree[e - 1] < h) e--;
    for (; b >= e; b--) tl[b] = e;
    e--;
  }
  printf("%lf\n", fun(1, n, 1, 1));
}
