#include <bits/stdc++.h>
using namespace std;
const int N = 2007;
int n, h;
int x[N];
double p;
double dp[N][N][2][2];
bool vis[N][N][2][2];
int l[N], r[N];
double DP(int L, int R, int s1, int s2) {
  if (L > R) return 0;
  double &ret = dp[L][R][s1][s2];
  if (vis[L][R][s1][s2]) return ret;
  vis[L][R][s1][s2] = 1;
  ret = 0;
  if (r[L] >= R) {
    int c = x[R] - x[L];
    if (s2 == 1) {
      c += min(h, x[R + 1] - x[R]);
    } else {
      c += min(2 * h, x[R + 1] - x[R]) - h;
    }
    ret += 0.5 * (1 - p) * c;
  } else {
    ret += 0.5 * (1 - p) * (DP(r[L] + 1, R, 1, s2) + (x[r[L]] + h - x[L]));
  }
  if (l[R] <= L) {
    int c = x[R] - x[L];
    if (s1 == 0) {
      c += min(x[L] - x[L - 1], h);
    } else {
      c += min(2 * h, x[L] - x[L - 1]) - h;
    }
    ret += 0.5 * p * c;
  } else {
    ret += 0.5 * p * (DP(L, l[R] - 1, s1, 0) + (x[R] - x[l[R]] + h));
  }
  if (s1 == 0) {
    ret += 0.5 * p * (DP(L + 1, R, 0, s2) + min(x[L] - x[L - 1], h));
  } else {
    ret += 0.5 * p * (DP(L + 1, R, 0, s2) + min(x[L] - x[L - 1], 2 * h) - h);
  }
  if (s2 == 1) {
    ret += 0.5 * (1 - p) * (DP(L, R - 1, s1, 1) + min(x[R + 1] - x[R], h));
  } else {
    ret +=
        0.5 * (1 - p) * (DP(L, R - 1, s1, 1) + min(x[R + 1] - x[R], 2 * h) - h);
  }
  return ret;
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  for (int i = int(1); i <= int(n); ++i) scanf("%d", x + i);
  sort(x + 1, x + 1 + n);
  x[0] = -1e9;
  x[n + 1] = 1e9;
  r[n] = n;
  for (int i = int(n - 1); i >= int(1); --i)
    if (x[i + 1] - x[i] < h)
      r[i] = r[i + 1];
    else
      r[i] = i;
  l[1] = 1;
  for (int i = int(2); i <= int(n); ++i)
    if (x[i] - x[i - 1] < h)
      l[i] = l[i - 1];
    else
      l[i] = i;
  printf("%.9f\n", DP(1, n, 0, 0));
}
