#include <bits/stdc++.h>
using namespace std;
const double EPS = 1.0 / 1000000000;
const long long mod = 1000000007;
double dp[2000][2000][2][2][2];
double a[2000];
double p;
double h;
int n;
double f(int i, int j, int lft, int rght, int prev) {
  if (dp[i][j][lft][rght][prev] >= 0) return dp[i][j][lft][rght][prev];
  double ans = 0;
  if (prev == 0 && lft == 1 && a[i] - a[i - 1] < h) {
    if (i == j) {
      if (j == n - 1)
        ans = h;
      else if (rght == 0)
        ans = min(h, a[j + 1] - a[j] - h);
      else
        ans = min(h, a[j + 1] - a[j]);
    } else
      ans = f(i + 1, j, 1, rght, 0) + min(h, a[i + 1] - a[i]);
  } else if (prev == 1 && rght == 0 && a[j + 1] - a[j] < h) {
    if (i == j) {
      if (i == 0)
        ans = h;
      else if (lft == 0)
        ans = min(h, a[i] - a[i - 1]);
      else
        ans = min(h, a[i] - a[i - 1] - h);
    } else
      ans = f(i, j - 1, lft, 0, 1) + min(h, a[j] - a[j - 1]);
  } else if (i == j) {
    if (i == 0)
      ans += p * h;
    else if (lft == 0)
      ans += p * min(h, a[i] - a[i - 1]);
    else
      ans += p * min(h, a[i] - h - a[i - 1]);
    if (j == n - 1)
      ans += (1 - p) * h;
    else if (rght == 0)
      ans += (1 - p) * min(h, a[i + 1] - h - a[i]);
    else
      ans += (1 - p) * min(h, a[i + 1] - a[i]);
  } else {
    ans +=
        0.5 * ((1 - p) * (min(h, a[i + 1] - a[i]) + f(i + 1, j, 1, rght, 0)));
    ans += 0.5 * (p * (min(h, a[j] - a[j - 1]) + f(i, j - 1, lft, 0, 1)));
    if (i == 0)
      ans += 0.5 * (p * (h + f(i + 1, j, 0, rght, 0)));
    else if (lft == 0)
      ans += 0.5 * (p * (min(h, a[i] - a[i - 1]) + f(i + 1, j, 0, rght, 0)));
    else if (lft == 1)
      ans +=
          0.5 * (p * (min(h, a[i] - a[i - 1] - h) + f(i + 1, j, 0, rght, 0)));
    if (j == n - 1)
      ans += 0.5 * ((1 - p) * (h + f(i, j - 1, lft, 1, 1)));
    else if (rght == 0)
      ans += 0.5 *
             ((1 - p) * (min(h, a[j + 1] - h - a[j]) + f(i, j - 1, lft, 1, 1)));
    else if (rght == 1)
      ans +=
          0.5 * ((1 - p) * (min(h, a[j + 1] - a[j]) + f(i, j - 1, lft, 1, 1)));
  }
  return dp[i][j][lft][rght][prev] = ans;
}
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> n >> h >> p;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  cout.precision(17);
  cout << f(0, n - 1, 0, 0, 0) << endl;
  int __________________;
  cin >> __________________;
  return 0;
}
