#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5, M = 1e9 + 7;
int n, h, pos[N], LeBoss[N], RiBoss[N];
double p, dp[N][N][2][2];
int le[N], ri[N];
int vis[N][N][2][2];
int findLeBoss(int x) {
  if (LeBoss[x] == x) return x;
  return LeBoss[x] = findLeBoss(LeBoss[x]);
}
int findRiBoss(int x) {
  if (RiBoss[x] == x) return x;
  return RiBoss[x] = findRiBoss(RiBoss[x]);
}
double fun(int l, int r, int f1, int f2) {
  if (l > r) return 0;
  double &ret = dp[l][r][f1][f2];
  if (vis[l][r][f1][f2]) return ret;
  vis[l][r][f1][f2]++;
  ret = 0;
  int cost;
  if (l > 0) {
    if (f1)
      cost = min(pos[l] - pos[l - 1], h);
    else
      cost = min(pos[l] - pos[l - 1] - h, h);
  } else
    cost = h;
  ret += p * (cost + fun(l + 1, r, 1, f2));
  int rb = min(r, RiBoss[l]);
  if (rb == r) {
    if (rb == n - 1)
      cost = h;
    else {
      if (f2)
        cost = min(pos[rb + 1] - pos[rb] - h, h);
      else
        cost = min(pos[rb + 1] - pos[rb], h);
    }
  } else
    cost = min(pos[rb + 1] - pos[rb], h);
  cost += pos[rb] - pos[l];
  ret += (1 - p) * (cost + fun(rb + 1, r, 0, f2));
  int lb = max(l, LeBoss[r]);
  if (lb == l) {
    if (!lb)
      cost = h;
    else {
      if (f1)
        cost = min(pos[lb] - pos[lb - 1], h);
      else
        cost = min(pos[lb] - pos[lb - 1] - h, h);
    }
  } else
    cost = min(pos[lb] - pos[lb - 1], h);
  cost += pos[r] - pos[lb];
  ret += p * (cost + fun(l, lb - 1, f1, 1));
  if (r < n - 1) {
    if (f2)
      cost = min(pos[r + 1] - pos[r] - h, h);
    else
      cost = min(pos[r + 1] - pos[r], h);
  } else
    cost = h;
  ret += (1 - p) * (cost + fun(l, r - 1, f1, 0));
  ret /= 2;
  return ret;
}
int main() {
  cin >> n >> h >> p;
  for (int i = 0; i < n; i++) cin >> pos[i];
  sort(pos, pos + n);
  for (int i = 0; i < n; i++) LeBoss[i] = i;
  for (int i = 0; i < n; i++) {
    if (i && pos[i - 1] + h > pos[i]) LeBoss[i] = findLeBoss(i - 1);
  }
  for (int i = 0; i < n; i++) RiBoss[i] = i;
  for (int i = n - 1; i >= 0; i--) {
    if (i < n - 1 && pos[i + 1] < h + pos[i]) RiBoss[i] = findRiBoss(i + 1);
  }
  printf("%.10f\n", fun(0, n - 1, 0, 0));
  return 0;
}
