#include <bits/stdc++.h>
using namespace std;
int i, j, n, h;
double p;
int x[2010];
double q[2010][2010][4];
bool checked[2010][2010][4];
double mymin(double a, double b) { return a < b ? a : b; }
double make(int l, int r, int state) {
  if (checked[l][r][state]) return q[l][r][state];
  checked[l][r][state] = true;
  if (l == r) {
    if ((state & 1) && x[l] - x[l - 1] < h) {
      if (state & 2) {
        q[l][r][state] = mymin(x[l + 1] - x[l], h);
      } else {
        assert(x[l + 1] - x[l] >= h);
        q[l][r][state] = mymin(x[l + 1] - x[l] - h, h);
      }
      return q[l][r][state];
    }
    if (!(state & 2) && x[r + 1] - x[r] < h) {
      if (!(state & 1)) {
        q[l][r][state] = mymin(x[l] - x[l - 1], h);
      } else {
        assert(x[l] - x[l - 1] >= h);
        q[l][r][state] = mymin(x[l] - x[l - 1] - h, h);
      }
      return q[l][r][state];
    }
    double left_space = x[l] - x[l - 1], right_space = x[r + 1] - x[r];
    if (state & 1) {
      left_space -= h;
    }
    if (!(state & 2)) {
      right_space -= h;
    }
    assert(left_space >= 0);
    assert(right_space >= 0);
    q[l][r][state] = p * mymin(left_space, h) + (1 - p) * mymin(right_space, h);
    return q[l][r][state];
  }
  q[l][r][state] = 0;
  if ((state & 1) && x[l] - x[l - 1] < h) {
    q[l][r][state] = make(l + 1, r, state) + mymin(x[l + 1] - x[l], h);
    return q[l][r][state];
  }
  if (!(state & 2) && x[r + 1] - x[r] < h) {
    q[l][r][state] = make(l, r - 1, state) + mymin(x[r] - x[r - 1], h);
    return q[l][r][state];
  }
  double left_space = x[l] - x[l - 1], right_space = x[r + 1] - x[r];
  if (state & 1) {
    left_space -= h;
  }
  if (!(state & 2)) {
    right_space -= h;
  }
  q[l][r][state] +=
      (p) * (mymin(left_space, h) + make(l + 1, r, (state & 2))) +
      (1 - p) * (make(l + 1, r, (state & 2) | 1) + mymin(x[l + 1] - x[l], h));
  q[l][r][state] +=
      (p) * (make(l, r - 1, (state & 1)) + mymin(x[r] - x[r - 1], h)) +
      (1 - p) * (mymin(right_space, h) + make(l, r - 1, (state & 1) | 2));
  q[l][r][state] /= 2;
  return q[l][r][state];
}
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
  }
  sort(&x[1], &x[n + 1]);
  x[0] = -1000000000;
  x[n + 1] = 1000000000;
  double ans = make(1, n, 2);
  printf("%.10lf\n", ans);
  return 0;
}
