#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int MAXN = 2005;
int n, h, x[MAXN];
double p;
int tail[MAXN], head[MAXN];
int rlen[MAXN], llen[MAXN];
double dp[MAXN][MAXN];
double pl[MAXN][MAXN], pr[MAXN][MAXN];
void solve() {
  memset(dp, 0, sizeof(dp));
  memset(pl, 0, sizeof(pl));
  memset(pr, 0, sizeof(pr));
  sort(x, x + n);
  tail[n - 1] = n;
  rlen[n - 1] = h;
  for (int i = n - 2; i >= 0; i--) {
    if (x[i + 1] - x[i] < h) {
      tail[i] = tail[i + 1];
      rlen[i] = rlen[i + 1] + x[i + 1] - x[i];
    } else {
      tail[i] = i + 1;
      rlen[i] = h;
    }
  }
  head[0] = -1;
  llen[0] = h;
  for (int i = 1; i < n; i++) {
    if (x[i] - x[i - 1] < h) {
      head[i] = head[i - 1];
      llen[i] = llen[i - 1] + x[i] - x[i - 1];
    } else {
      head[i] = i - 1;
      llen[i] = h;
    }
  }
  for (int i = 0; i < n; i++) {
    dp[i][i] = h;
    pl[i][i] = p;
    pr[i][i] = 1 - p;
  }
  for (int d = 1; d < n; d++) {
    for (int i = 0; i + d < n; i++) {
      int j = i + d;
      dp[i][j] +=
          p * (h + dp[i + 1][j] - pl[i + 1][j] * max(0, x[i] - (x[i + 1] - h)));
      if (tail[i] <= j) {
        dp[i][j] +=
            (1 - p) *
            (rlen[i] + dp[tail[i]][j] -
             pl[tail[i]][j] * max(0, (x[tail[i] - 1] + h) - (x[tail[i]] - h)));
      } else {
        dp[i][j] += (1 - p) * (x[j] - x[i] + h);
      }
      dp[i][j] += (1 - p) * (h + dp[i][j - 1] -
                             pr[i][j - 1] * max(0, (x[j - 1] + h) - x[j]));
      if (head[j] >= i) {
        dp[i][j] += p * (llen[j] + dp[i][head[j]] -
                         pr[i][head[j]] *
                             max(0, (x[head[j]] + h) - (x[head[j] + 1] - h)));
      } else {
        dp[i][j] += p * (x[j] - x[i] + h);
      }
      dp[i][j] /= 2;
      pl[i][j] = (p + p * (head[j] >= i ? pl[i][head[j]] : 1) +
                  (1 - p) * pl[i][j - 1]) /
                 2;
      pr[i][j] = ((1 - p) + (1 - p) * (tail[i] <= j ? pr[tail[i]][j] : 1) +
                  p * pr[i + 1][j]) /
                 2;
    }
  }
  cout << fixed << setprecision(12) << dp[0][n - 1] << endl;
}
int main() {
  while (cin >> n >> h >> p) {
    for (int i = 0; i < n; i++) {
      cin >> x[i];
    }
    solve();
  }
}
