#include <bits/stdc++.h>
using namespace std;
double dp[2010][2010][2][2];
int pos[2010], vis[2010][2010][2][2], sz[2][2010], n, h;
double p;
double compute(int L, int R, int fl, int fr) {
  if (L > R) return 0;
  if (vis[L][R][fl][fr]) return dp[L][R][fl][fr];
  vis[L][R][fl][fr] = 1;
  double& ans = dp[L][R][fl][fr];
  int el = min(R, L + sz[0][L] - 1);
  if (el == R) {
    if (fr == 1)
      ans += (1 - p) * (pos[el] - pos[L] + min(h, pos[R + 1] - pos[R]));
    else
      ans += (1 - p) * (pos[el] - pos[L] + min(h, pos[R + 1] - pos[R] - h));
  } else {
    ans += (1 - p) * (pos[el] - pos[L] + h);
    ans += (1 - p) * compute(el + 1, R, 1, fr);
  }
  if (fl == 0)
    ans += p * min(h, pos[L] - pos[L - 1]);
  else
    ans += p * min(h, pos[L] - pos[L - 1] - h);
  ans += p * compute(L + 1, R, 0, fr);
  int er = max(L, R - sz[1][R] + 1);
  if (er == L) {
    if (fl == 0)
      ans += p * (pos[R] - pos[er] + min(h, pos[L] - pos[L - 1]));
    else
      ans += p * (pos[R] - pos[er] + min(h, pos[L] - pos[L - 1] - h));
  } else {
    ans += p * (pos[R] - pos[er] + h);
    ans += p * compute(L, er - 1, fl, 0);
  }
  if (fr == 1)
    ans += (1 - p) * min(h, pos[R + 1] - pos[R]);
  else
    ans += (1 - p) * min(h, pos[R + 1] - pos[R] - h);
  ans += (1 - p) * compute(L, R - 1, fl, 1);
  ans /= 2;
  return ans;
}
int main() {
  scanf("%d%d%lf", &n, &h, &p);
  for (int i = 0; i < n; i++) scanf("%d", &pos[i]);
  pos[n] = 2000000100;
  pos[n + 1] = -2000000100;
  n += 2;
  sort(pos, pos + n);
  sz[1][0] = 1;
  for (int i = 1; i <= n; i++) {
    if (pos[i] - pos[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 (pos[i + 1] - pos[i] < h)
      sz[0][i] = sz[0][i + 1] + 1;
    else
      sz[0][i] = 1;
  }
  printf("%.9lf", compute(1, n - 2, 0, 1));
  return 0;
}
