#include <bits/stdc++.h>
using namespace std;
int n, h;
double p;
int lhs[2002], rhs[2002];
int pos[2002];
double DP[2002][2002][2][2];
double work(int l, int r, int le, int ri, int ls, int rs) {
  if (DP[l][r][le][ri] >= -1) return DP[l][r][le][ri];
  double &ans = DP[l][r][le][ri];
  ans = 0.0;
  if (l == r) {
    ans = p * min(h, ls) + (1 - p) * min(h, rs);
    return ans;
  }
  ans += (min(h, ls) + work(l + 1, r, 0, ri, pos[l + 1] - pos[l], rs)) * p;
  ans +=
      (min(h, rs) + work(l, r - 1, le, 1, ls, pos[r] - pos[r - 1])) * (1 - p);
  if (rhs[l] >= r)
    ans += (pos[r] - pos[l] + min(h, rs)) * (1 - p);
  else
    ans += (pos[rhs[l]] - pos[l] + h +
            work(rhs[l] + 1, r, 1, ri, pos[rhs[l] + 1] - pos[rhs[l]] - h, rs)) *
           (1 - p);
  if (lhs[r] <= l)
    ans += (pos[r] - pos[l] + min(h, ls)) * p;
  else
    ans += (pos[r] - pos[lhs[r]] + h +
            work(l, lhs[r] - 1, le, 0, ls, pos[lhs[r]] - pos[lhs[r] - 1] - h)) *
           p;
  ans /= 2;
  return ans;
}
int main() {
  int i;
  cin >> n >> h >> p;
  for (i = 1; i <= n; i++) cin >> pos[i];
  sort(pos + 1, pos + n + 1);
  lhs[1] = 1;
  for (i = 2; i <= n; i++) {
    if (pos[i] - pos[i - 1] < h)
      lhs[i] = lhs[i - 1];
    else
      lhs[i] = i;
  }
  rhs[n] = n;
  for (i = n - 1; i >= 1; i--) {
    if (pos[i + 1] - pos[i] < h)
      rhs[i] = rhs[i + 1];
    else
      rhs[i] = i;
  }
  memset(DP, -1, sizeof(DP));
  ;
  printf("%0.8lf\n", work(1, n, 0, 1, h, h));
  return 0;
}
