#include <bits/stdc++.h>
using namespace std;
void SR(int &x) { scanf("%d", &x); }
void SR(long long &x) { scanf("%lld", &x); }
void SR(double &x) { scanf("%lf", &x); }
void SR(char *s) { scanf("%s", s); }
void RI() {}
template <typename I, typename... T>
void RI(I &x, T &...tail) {
  SR(x);
  RI(tail...);
}
void SP(const int x) { printf("%d", x); }
void SP(const long long x) { printf("%lld", x); }
void SP(const double x) { printf("%.16lf", x); }
void SP(const char *s) { printf(s); }
void PS() { puts(""); }
template <typename I, typename... T>
void PS(I &x, T &...tail) {
  putchar(' ');
  SP(x);
  PS(tail...);
}
void PL() { puts(""); }
template <typename I, typename... T>
void PL(const I x, const T... tail) {
  SP(x);
  PS(tail...);
}
const int maxn = 2e3 + 3;
int n;
long long h;
double p;
long long x[maxn];
void read() {
  RI(n, h, p);
  for (int i = (1); i <= int(n); i++) RI(x[i]);
}
int l2r[maxn], r2l[maxn];
void build() {
  sort(x + 1, x + n + 1);
  l2r[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (x[i + 1] - x[i] < h)
      l2r[i] = l2r[i + 1];
    else
      l2r[i] = i;
  }
  r2l[1] = 1;
  for (int i = (2); i <= int(n); i++) {
    if (x[i] - x[i - 1] < h)
      r2l[i] = r2l[i - 1];
    else
      r2l[i] = i;
  }
}
const int L = 0, R = 1;
double sp[maxn][maxn][2][2], spl[maxn][maxn][2][2];
void doo(int l, int r) {
  auto &myp = sp[l][r], &myl = spl[l][r];
  {
    double dp = 0.5 * p;
    if (l == r) {
      myp[L][L] += p;
      myl[L][L] += p * h;
    } else {
      auto &np = sp[l + 1][r], &nl = spl[l + 1][r];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myp[L][j] += dp * np[i][j];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myl[L][j] += dp * nl[i][j];
      for (int j = 0; j < int(2); j++) myl[L][j] += dp * h * np[R][j];
      for (int j = 0; j < int(2); j++)
        myl[L][j] += dp * min(h, x[l + 1] - x[l]) * np[L][j];
    }
  }
  {
    double dp = 0.5 * (1 - p);
    if (l == r) {
      myp[R][R] += 1 - p;
      myl[R][R] += (1 - p) * h;
    } else if (l2r[l] >= r) {
      myp[R][R] += dp;
      myl[R][R] += dp * (x[r] + h - x[l]);
    } else {
      int m = l2r[l];
      auto &np = sp[m + 1][r], &nl = spl[m + 1][r];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myp[R][j] += dp * np[i][j];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myl[R][j] += dp * nl[i][j];
      for (int j = 0; j < int(2); j++)
        myl[R][j] += dp * (x[m] + h - x[l]) * np[R][j];
      for (int j = 0; j < int(2); j++)
        myl[R][j] += dp *
                     (x[m] + h - x[l] - max(0LL, x[m] + h - (x[m + 1] - h))) *
                     np[L][j];
    }
  }
  {
    double dp = 0.5 * p;
    if (l == r)
      ;
    else if (r2l[r] <= l) {
      myp[L][L] += dp;
      myl[L][L] += dp * (x[r] + h - x[l]);
    } else {
      int m = r2l[r];
      auto &np = sp[l][m - 1], &nl = spl[l][m - 1];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myp[i][L] += dp * np[i][j];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myl[i][L] += dp * nl[i][j];
      for (int i = 0; i < int(2); i++)
        myl[i][L] += dp * (x[r] + h - x[m]) * np[i][L];
      for (int i = 0; i < int(2); i++)
        myl[i][L] += dp *
                     (x[r] + h - x[m] - max(0LL, x[m - 1] + h - (x[m] - h))) *
                     np[i][R];
    }
  }
  {
    double dp = 0.5 * (1 - p);
    if (l == r)
      ;
    else {
      auto &np = sp[l][r - 1], &nl = spl[l][r - 1];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myp[i][R] += dp * np[i][j];
      for (int i = 0; i < int(2); i++)
        for (int j = 0; j < int(2); j++) myl[i][R] += dp * nl[i][j];
      for (int i = 0; i < int(2); i++) myl[i][R] += dp * h * np[i][L];
      for (int i = 0; i < int(2); i++)
        myl[i][R] += dp * min(h, x[r] - x[r - 1]) * np[i][R];
    }
  }
}
void sol() {
  for (int d = 0; d < int(n); d++)
    for (int l = (1); l <= int(n); l++)
      if (l + d <= n) doo(l, l + d);
  double ans = 0;
  for (int i = 0; i < int(2); i++)
    for (int j = 0; j < int(2); j++) ans += spl[1][n][i][j];
  PL(ans);
}
int main() {
  read();
  build();
  sol();
  return 0;
}
