#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 100;
long long n, h;
long double p;
long long x[N], arr[N];
int lft[N], ryt[N];
long double dp[N][N][2][2];
double compute(int lef, int rig, int fl, int fr) {
  if (lef > rig) return 0;
  if (dp[lef][rig][fl][fr] != -1) return dp[lef][rig][fl][fr];
  dp[lef][rig][fl][fr] = 0;
  double ans = 0;
  int nl = min(rig, ryt[lef]);
  if (nl == rig) {
    if (fr == 0)
      ans +=
          (1 - p) * (min(h, arr[rig + 1] - arr[rig] - h) + arr[rig] - arr[lef]);
    else
      ans += (1 - p) * (min(h, arr[rig + 1] - arr[rig]) + arr[rig] - arr[lef]);
  } else {
    ans += (1 - p) * compute(nl + 1, rig, 1, fr);
    ans += (1 - p) * (arr[nl] - arr[lef] + h);
  }
  if (fl == 1) {
    ans += p * min(h, arr[lef] - arr[lef - 1] - h);
  } else {
    ans += p * min(h, arr[lef] - arr[lef - 1]);
  }
  ans += p * compute(lef + 1, rig, 0, fr);
  int nr = max(lef, lft[rig]);
  if (nr == lef) {
    if (fl == 1)
      ans += p * (min(h, arr[lef] - arr[lef - 1] - h) + arr[rig] - arr[lef]);
    else
      ans += p * (min(h, arr[lef] - arr[lef - 1]) + arr[rig] - arr[lef]);
  } else {
    ans += p * compute(lef, nr - 1, fl, 0);
    ans += p * (arr[rig] - arr[nr] + h);
  }
  if (fr == 0) {
    ans += (1 - p) * min(h, arr[rig + 1] - arr[rig] - h);
  } else {
    ans += (1 - p) * min(h, arr[rig + 1] - arr[rig]);
  }
  ans += (1 - p) * compute(lef, rig - 1, fl, 1);
  ans /= 2.0;
  dp[lef][rig][fl][fr] = ans;
  return ans;
}
int main() {
  cin >> n >> h >> p;
  for (int i = 1; i <= n; i++) cin >> x[i];
  sort(x + 1, x + n + 1);
  x[0] = -500000000;
  x[n + 1] = 500000000;
  for (int i = 0; i <= n + 1; i++) arr[i] = x[i];
  for (int i = 1; i <= n; i++) {
    int prev = i;
    for (int j = i - 1; j >= 1; j--) {
      if (abs(x[j] - x[prev]) < h)
        prev = j;
      else
        break;
    }
    lft[i] = prev;
    prev = i;
    for (int j = i + 1; j <= n; j++) {
      if (abs(x[j] - x[prev]) < h)
        prev = j;
      else
        break;
    }
    ryt[i] = prev;
  }
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= n + 1; j++)
      for (int k = 0; k < 2; k++)
        for (int x = 0; x < 2; x++) dp[i][j][k][x] = -1;
  cout << fixed << setprecision(12) << compute(1, n, 0, 1);
  return 0;
}
