#include <bits/stdc++.h>
using namespace std;
int n, h, x[2005], r[2005], l[2005];
double p, dp[2005][2005][2][2];
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
  }
  sort(x + 1, x + 1 + n);
  x[0] = -1e9, x[n + 1] = 1e9;
  for (int i = 1; i <= n; i++) {
    int j = i - 1;
    while (x[j + 1] - x[j] < h) j--;
    l[i] = j;
    j = i + 1;
    while (x[j] - x[j - 1] < h) j++;
    r[i] = j;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < 2; j++) {
      for (int k = 0; k < 2; k++) {
        int xx = x[i - 1] + j * h;
        int yy = x[i + 1] - (1 - k) * h;
        dp[i][i][j][k] = p * min(h, x[i] - xx);
        dp[i][i][j][k] += (1 - p) * min(h, yy - x[i]);
      }
    }
  }
  for (int len = 2; len <= n; len++) {
    for (int i = 1, j = len; j <= n; i++, j++) {
      for (int c = 0; c < 2; c++) {
        for (int d = 0; d < 2; d++) {
          int xx = x[i - 1] + c * h;
          int yy = x[j + 1] - (1 - d) * h;
          dp[i][j][c][d] = p * (min(h, x[i] - xx) + dp[i + 1][j][0][d]);
          dp[i][j][c][d] += (1 - p) * (min(yy - x[i], x[r[i] - 1] - x[i] + h) +
                                       dp[r[i]][j][1][d]);
          dp[i][j][c][d] += (1 - p) * (min(h, yy - x[j]) + dp[i][j - 1][c][1]);
          dp[i][j][c][d] +=
              p * (min(x[j] - xx, x[j] - x[l[j] + 1] + h) + dp[i][l[j]][c][0]);
          dp[i][j][c][d] /= 2.0;
        }
      }
    }
  }
  printf("%.10lf", dp[1][n][0][0]);
  return 0;
}
