#include <bits/stdc++.h>
using namespace std;
int x[2010];
int n, h;
double p;
double dp[2010][2010][2][2];
double f(int l, int r, int dl, int dr) {
  if (l > r) return 0;
  if (dp[l][r][dl][dr] != -1) return dp[l][r][dl][dr];
  if (dl == 1 && x[l] - x[l - 1] < h) {
    if (r > l || dr == 1)
      return dp[l][r][dl][dr] = min(x[l + 1] - x[l], h) + f(l + 1, r, 1, dr);
    return dp[l][r][dl][dr] = min(x[l + 1] - h - x[l], h) + f(l + 1, r, 1, dr);
  }
  if (dr == 0 && x[r + 1] - x[r] < h) {
    if (r > l || dl == 0)
      return dp[l][r][dl][dr] = min(x[r] - x[r - 1], h) + f(l, r - 1, dl, 0);
    return dp[l][r][dl][dr] = min(x[r] - h - x[r - 1], h) + f(l, r - 1, dl, 0);
  }
  double ans = 0;
  if (dl == 0) {
    ans += p / 2 * (min(x[l] - x[l - 1], h) + f(l + 1, r, 0, dr));
  } else {
    ans += p / 2 * (min(x[l] - x[l - 1] - h, h) + f(l + 1, r, 0, dr));
  }
  if (r > l || dr == 1)
    ans += (1 - p) / 2 * (min(x[l + 1] - x[l], h) + f(l + 1, r, 1, dr));
  else
    ans += (1 - p) / 2 * (min(x[l + 1] - h - x[l], h) + f(l + 1, r, 1, dr));
  if (r > l || dl == 0)
    ans += p / 2 * (min(x[r] - x[r - 1], h) + f(l, r - 1, dl, 0));
  else
    ans += p / 2 * (min(x[r] - h - x[r - 1], h) + f(l, r - 1, dl, 0));
  if (dr == 1) {
    ans += (1 - p) / 2 * (min(x[r + 1] - x[r], h) + f(l, r - 1, dl, 1));
  } else {
    ans += (1 - p) / 2 * (min(x[r + 1] - x[r] - h, h) + f(l, r - 1, dl, 1));
  }
  return dp[l][r][dl][dr] = ans;
}
int main() {
  while (cin >> n >> h >> p) {
    for (int i = 1; i <= n; i++) {
      cin >> x[i];
    }
    for (int i = 0; i <= n + 1; i++) {
      for (int j = 0; j <= n + 1; j++) {
        dp[i][j][0][0] = dp[i][j][0][1] = dp[i][j][1][0] = dp[i][j][1][1] = -1;
      }
    }
    sort(x + 1, x + n + 1);
    x[0] = x[1] - h;
    x[n + 1] = x[n] + h;
    double ans = f(1, n, 0, 1);
    printf("%.10lf\n", ans);
  }
  return 0;
}
