#include <bits/stdc++.h>
using namespace std;
int n, h;
double p, dp[2009][2009][2][2];
int a[2009], L[2009], R[2009];
bool vis[2009][2009][2][2];
double dfs(int l, int r, int x, int y) {
  if (vis[l][r][x][y]) return dp[l][r][x][y];
  vis[l][r][x][y] = 1;
  double &ans = dp[l][r][x][y];
  ans = 0;
  int left, right;
  if (x == 0) {
    left = a[l] - a[l - 1];
  } else {
    left = max(0, a[l] - a[l - 1] - h);
  }
  if (y == 0) {
    right = max(0, a[r + 1] - a[r] - h);
  } else {
    right = a[r + 1] - a[r];
  }
  if (l > r) {
    return ans = 0;
  } else if (l == r) {
    return ans = p * min(h, left) + (1 - p) * min(h, right);
  } else {
    ans += 0.5 * p * (min(h, left) + dfs(l + 1, r, 0, y));
    int to = min(r, R[l]);
    if (to < r) {
      ans += 0.5 * (1 - p) * (a[to] - a[l] + h + dfs(to + 1, r, 1, y));
    } else {
      ans += 0.5 * (1 - p) * (a[to] - a[l] + min(h, right));
    }
    ans += 0.5 * (1 - p) * (min(h, right) + dfs(l, r - 1, x, 1));
    to = max(l, L[r]);
    if (to > l) {
      ans += 0.5 * p * (a[r] - a[to] + h + dfs(l, to - 1, x, 0));
    } else {
      ans += 0.5 * p * (a[r] - a[to] + min(h, left));
    }
    return ans;
  }
}
int main() {
  cin >> n >> h >> p;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  a[0] = -1e9;
  a[n + 1] = 1e9;
  L[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] - a[i - 1] < h)
      L[i] = L[i - 1];
    else
      L[i] = i;
  }
  R[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i + 1] - a[i] < h)
      R[i] = R[i + 1];
    else
      R[i] = i;
  }
  printf("%.10f\n", dfs(1, n, 0, 1));
  return 0;
}
