#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int maxn = 1e6 + 1;
double pie = 3.1415926535;
double dp[2002][2002][2][2], p;
long long int h, dright[2002], dleft[2002], a[2002];
double go(long long int lidx, long long int ridx, bool s, bool d,
          long long int ls, long long int rs) {
  if (lidx > ridx) {
    return 0;
  }
  if (dp[lidx][ridx][s][d] > -1.0) return dp[lidx][ridx][s][d];
  double ans = 0.0;
  ans =
      ans + p * (go(lidx + 1, ridx, 0, d, a[lidx], rs) + min(h, a[lidx] - ls));
  ans +=
      (1.0 - p) * (go(dright[lidx] + 1, ridx, 1, d, a[dright[lidx]] + h, rs) +
                   (min(a[dright[lidx]] + h, rs) - a[lidx]));
  ans = ans + (1.0 - p) * (go(lidx, ridx - 1, s, 0, ls, a[ridx]) +
                           min(h, rs - a[ridx]));
  ans = ans + p * (go(lidx, dleft[ridx] - 1, s, 1, ls, a[dleft[ridx]] - h) +
                   (a[ridx] - max(a[dleft[ridx]] - h, ls)));
  ans = ans / 2.0;
  return dp[lidx][ridx][s][d] = ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i, j, k, l;
  cin >> n >> h >> p;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    dright[i] = i;
    for (j = i + 1; j < n; j++) {
      if (a[j] - a[j - 1] < h)
        dright[i] = j;
      else
        break;
    }
  }
  for (i = 0; i < n; i++) {
    dleft[i] = i;
    for (j = i - 1; j >= 0; j--) {
      if (a[j + 1] - a[j] < h)
        dleft[i] = j;
      else
        break;
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      for (k = 0; k < 2; k++) {
        for (l = 0; l < 2; l++) {
          dp[i][j][k][l] = -1.0;
        }
      }
    }
  }
  cout << fixed << setprecision(12) << go(0, n - 1, 0, 0, -1e9, 1e9) << endl;
}
