#include <bits/stdc++.h>
using namespace std;
int n, h, arr[2010], sz[2][2010];
double dp[2010][2010][2][2], p;
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, lef + sz[0][lef] - 1);
  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, rig - sz[1][rig] + 1);
  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(void) {
  for (int i = 0; i < 2010; i++) {
    for (int j = 0; j < 2010; j++) {
      for (int k = 0; k < 2; k++) {
        for (int l = 0; l < 2; l++) {
          dp[i][j][k][l] = -1;
        }
      }
    }
  }
  cin >> n >> h >> p;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  arr[n] = 500000000;
  arr[n + 1] = -500000000;
  n += 2;
  sort(arr, arr + n);
  sz[1][0] = 1;
  for (int i = 1; i <= n; i++) {
    if (arr[i] - arr[i - 1] < h)
      sz[1][i] = sz[1][i - 1] + 1;
    else
      sz[1][i] = 1;
  }
  sz[0][n] = 1;
  for (int i = n - 1; i >= 0; i--) {
    if (arr[i + 1] - arr[i] < h)
      sz[0][i] = sz[0][i + 1] + 1;
    else
      sz[0][i] = 1;
  }
  printf("%.9f\n", compute(1, n - 2, 0, 1));
  return 0;
}
