#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
int v[MAXN];
int n, h;
double p;
double dp[MAXN][MAXN][2][2];
bool calc[MAXN][MAXN][2][2];
int rr[MAXN];
int lr[MAXN];
double solve(int l, int r, int tl, int tr) {
  if (l > r) return 0;
  if (calc[l][r][tl][tr]) return dp[l][r][tl][tr];
  int freel = h;
  int posl = -0x3f3f3f3f;
  if (l) posl = (!tl) ? (v[l - 1]) : ((v[l - 1] + h));
  if (l) freel = (!tl) ? (v[l] - v[l - 1]) : (v[l] - (v[l - 1] + h));
  freel = min(freel, h);
  int freer = h;
  int posr = 0x3f3f3f3f;
  if (r < n - 1) posr = (tr) ? (v[r + 1]) : (v[r + 1] - h);
  if (r < n - 1) freer = (tr) ? (v[r + 1] - v[r]) : (v[r + 1] - h - v[r]);
  freer = min(freer, h);
  double ans = 0;
  ans += 0.5 * p * (freel + solve(l + 1, r, 0, tr));
  int pos = min(rr[l], r);
  int ncov = v[pos] + h - v[l];
  ncov = min(ncov, posr - v[l]);
  ans += 0.5 * (1 - p) * (ncov + solve(pos + 1, r, 1, tr));
  ans += 0.5 * (1 - p) * (freer + solve(l, r - 1, tl, 1));
  pos = max(lr[r], l);
  ncov = v[r] - v[pos] + h;
  ncov = min(ncov, v[r] - posl);
  ans += 0.5 * (p) * (ncov + solve(l, pos - 1, tl, 0));
  calc[l][r][tl][tr] = true;
  return dp[l][r][tl][tr] = ans;
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin >> n >> h >> p;
  for (int i = 0; i < (n); ++i) cin >> v[i];
  sort(v, v + n);
  rr[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; --i) {
    rr[i] = i;
    if (v[i] + h > v[i + 1]) rr[i] = rr[i + 1];
  }
  lr[0] = 0;
  for (int i = 1; i < (n); ++i) {
    lr[i] = i;
    if (v[i] - h < v[i - 1]) lr[i] = lr[i - 1];
  }
  cout << fixed << setprecision(15) << solve(0, n - 1, 0, 1) << "\n";
  return 0;
}
