#include <bits/stdc++.h>
using namespace std;
int x[2222];
int dr[2222];
int dl[2222];
bool was[2222][2222][2][2];
double dp[2222][2222][2][2];
int n, h;
double p, rp;
void calc() {
  for (int i = 0; i <= n; ++i) {
    int j = i;
    while (j + 1 <= n && x[j] + h > x[j + 1]) j++;
    dr[i] = j;
  }
  for (int i = n; i > 0; --i) {
    int j = i;
    while (j - 1 >= 1 && x[j] - h < x[j - 1]) j--;
    dl[i] = j;
  }
}
double get(int l, int r, bool pl, bool pr) {
  if (l > r) return 0;
  int L = x[l - 1] + (pl ? 1 : 0) * h;
  int R = x[r + 1] - (pr ? 0 : 1) * h;
  if (l == r) {
    double ans = 0;
    ans += p * min(h, x[l] - L);
    ans += rp * min(h, R - x[l]);
    return ans;
  }
  if (was[l][r][pl][pr]) return dp[l][r][pl][pr];
  was[l][r][pl][pr] = 1;
  double ddl = 0, ddr = 0;
  ddl += p * min(h, x[l] - L);
  ddl += p * get(l + 1, r, 0, pr);
  int l1 = dr[l];
  if (l1 > r) l1 = r;
  ddl += rp * get(l1 + 1, r, 1, pr);
  ddl += rp * (min(x[l1] + h, R) - x[l]);
  ddr += rp * min(h, R - x[r]);
  ddr += rp * get(l, r - 1, pl, 1);
  int r1 = dl[r];
  if (r1 < l) r1 = l;
  ddr += p * get(l, r1 - 1, pl, 0);
  ddr += p * (x[r] - max(x[r1] - h, L));
  dp[l][r][pl][pr] = 0.5 * ddl + 0.5 * ddr;
  return dp[l][r][pl][pr];
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> h >> p;
  rp = 1 - p;
  for (int i = 1; i <= n; ++i) cin >> x[i];
  sort(x + 1, x + n + 1);
  x[0] = -1e9;
  x[n + 1] = 1e9;
  calc();
  cout.precision(10);
  cout << fixed << get(1, n, 0, 1) << "\n";
  return 0;
}
