#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
int n;
long long h, A[N], fallLeft[N], fallRight[N], costLeft[N], costRight[N];
double p, dp[N][N][2][2];
bool vis[N][N][2][2];
double calc(int x, int y, int xdir, int ydir) {
  if (x > y) return 0.0;
  if (vis[x][y][xdir][ydir] == true) return dp[x][y][xdir][ydir];
  vis[x][y][xdir][ydir] = true;
  long long x_cost, y_cost;
  double temp1 = 0, temp2 = 0;
  if (xdir == 1)
    x_cost = min(h, A[x] - A[x - 1] - h);
  else
    x_cost = min(h, A[x] - A[x - 1]);
  if (ydir == 0)
    y_cost = min(h, A[y + 1] - A[y] - h);
  else
    y_cost = min(h, A[y + 1] - A[y]);
  if (x == y)
    dp[x][y][xdir][ydir] = (p) * (x_cost) + (1.0 - p) * (y_cost);
  else {
    temp1 = ((1.0 - p) *
             (calc(fallRight[x], y, 1, ydir) +
              (fallRight[x] > y ? A[y] - A[x] + y_cost : costRight[x]))) +
            (p * (calc(x + 1, y, 0, ydir) + x_cost));
    temp2 = (p * (calc(x, fallLeft[y], xdir, 0) +
                  (fallLeft[y] < x ? A[y] - A[x] + x_cost : costLeft[y]))) +
            ((1.0 - p) * (calc(x, y - 1, xdir, 1) + y_cost));
    dp[x][y][xdir][ydir] = (0.5 * (temp1 + temp2));
  }
  return dp[x][y][xdir][ydir];
}
int main() {
  cin >> n >> h >> p;
  for (int i = 1; i <= n; i++) cin >> A[i];
  sort(A + 1, A + n + 1);
  A[0] = INT_MIN, A[n + 1] = INT_MAX;
  fallRight[n] = n + 1, costRight[n] = h;
  for (int i = n - 1; i >= 1; i--) {
    if (A[i + 1] - A[i] < h)
      fallRight[i] = fallRight[i + 1],
      costRight[i] = costRight[i + 1] + (A[i + 1] - A[i]);
    else
      fallRight[i] = i + 1, costRight[i] = h;
  }
  fallLeft[1] = 0, costLeft[1] = h;
  for (int i = 2; i <= n; i++) {
    if (A[i] - A[i - 1] < h)
      fallLeft[i] = fallLeft[i - 1],
      costLeft[i] = costLeft[i - 1] + (A[i] - A[i - 1]);
    else
      fallLeft[i] = i - 1, costLeft[i] = h;
  }
  cout << fixed << setprecision(12) << calc(1, n, 0, 1) << endl;
}
