#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:667772160")
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
double dp[2000 + 7][2000 + 7][2][2], p;
bool visit[2000 + 7][2000 + 7][2][2];
long long valu[2000 + 7], h;
int lft[2000 + 7], rgt[2000 + 7];
double rec(int l, int r, int l_c, int r_c) {
  if (l > r) return 0.0;
  double& ret = dp[l][r][l_c][r_c];
  if (visit[l][r][l_c][r_c]) return ret;
  int mx_l = min(r, l + rgt[l] - 1), mx_r = max(l, r - lft[r] + 1), l_v, r_v;
  if (l_c == 0)
    l_v = min(h, valu[l] - valu[l - 1]);
  else
    l_v = min(h, valu[l] - valu[l - 1] - h);
  if (r_c == 1)
    r_v = min(h, valu[r + 1] - valu[r]);
  else
    r_v = min(h, valu[r + 1] - valu[r] - h);
  ret = p * (rec(l + 1, r, 0, r_c) + l_v);
  ret += (1.0 - p) * (rec(l, r - 1, l_c, 1) + r_v);
  if (mx_l < r) r_v = h;
  if (mx_r > l) l_v = h;
  ret += (1.0 - p) * (rec(mx_l + 1, r, 1, r_c) + valu[mx_l] - valu[l] + r_v);
  double tp = ret;
  ret += p * (rec(l, mx_r - 1, l_c, 0) + valu[r] - valu[mx_r] + l_v);
  ret /= 2.0;
  visit[l][r][l_c][r_c] = true;
  return ret;
}
int main() {
  int n;
  scanf("%d", &n);
  scanf("%lld", &h);
  scanf("%lf", &p);
  for (int i = 1; i <= n; i++) scanf("%lld", &valu[i]);
  sort(valu + 1, valu + n + 1);
  valu[0] = -10000000000;
  valu[n + 1] = 10000000000;
  for (int i = 1; i <= n; i++) {
    if (valu[i] - valu[i - 1] < h)
      lft[i] = lft[i - 1] + 1;
    else
      lft[i] = 1;
  }
  for (int i = n; i > 0; i--) {
    if (valu[i + 1] - valu[i] < h)
      rgt[i] = rgt[i + 1] + 1;
    else
      rgt[i] = 1;
  }
  double ans = rec(1, n, 0, 1);
  printf("%.7f\n", ans);
  return 0;
}
