#include <bits/stdc++.h>
using namespace std;
const int N = 2020;
double dp[N][N][2][2];
int pos[N], nextPos[N], prevPos[N];
int n, height;
double p;
double go(int l, int r, bool lastL, bool lastR) {
  if (l > r) return 0.0;
  double& ret = dp[l][r][lastL][lastR];
  if (ret == ret) return ret;
  ret = 0.0;
  {
    double areaL = height;
    if (lastL) {
      areaL = min(areaL, (double)pos[l] - pos[l - 1] - height);
    } else {
      if (l > 0) {
        areaL = min(areaL, (double)pos[l] - pos[l - 1]);
      }
    }
    areaL += go(l + 1, r, false, lastR);
    int m = min(nextPos[l], r);
    double areaR = pos[m] - pos[l];
    double extra = height;
    if (m == r) {
      if (lastR) {
        extra = min(extra, (double)pos[r + 1] - pos[r] - height);
      } else if (r + 1 < n) {
        extra = min(extra, (double)pos[r + 1] - pos[r]);
      }
    }
    areaR += extra;
    areaR += go(m + 1, r, true, lastR);
    ret += 0.5 * (p * areaL + (1.0 - p) * areaR);
  }
  {
    int m = max(prevPos[r], l);
    double areaL = pos[r] - pos[m];
    double extra = height;
    if (m == l) {
      if (lastL) {
        extra = min(extra, (double)pos[l] - pos[l - 1] - height);
      } else if (l > 0) {
        extra = min(extra, (double)pos[l] - pos[l - 1]);
      }
    }
    areaL += extra;
    areaL += go(l, m - 1, lastL, true);
    double areaR = height;
    if (lastR) {
      areaR = min(areaR, (double)pos[r + 1] - pos[r] - height);
    } else if (r + 1 < n) {
      areaR = min(areaR, (double)pos[r + 1] - pos[r]);
    }
    areaR += go(l, r - 1, lastL, false);
    ret += 0.5 * (p * areaL + (1.0 - p) * areaR);
  }
  return ret;
}
int main() {
  scanf("%d%d%lf", &n, &height, &p);
  for (int i = 0; i < n; ++i) scanf("%d", pos + i);
  sort(pos, pos + n);
  for (int i = 0; i < n; ++i) {
    int j = i;
    while (j + 1 < n and pos[j + 1] - pos[j] < height) ++j;
    nextPos[i] = j;
    j = i;
    while (j > 0 and pos[j] - pos[j - 1] < height) --j;
    prevPos[i] = j;
  }
  memset(dp, -1, sizeof(dp));
  printf("%.15lf\n", go(0, n - 1, false, false));
  return 0;
}
