#include <bits/stdc++.h>
using namespace std;
int n, h;
int pl[2005], tut1[2005], tut2[2005], vis[2005][2005][2][2];
double p;
double dp[2005][2005][2][2];
double dfs(int bas, int son, int bef, int aft) {
  double res = 0;
  if (bas > son) return 0;
  if (vis[bas][son][bef][aft]) return dp[bas][son][bef][aft];
  if (bef == 0) {
    res +=
        0.5 * p * (min(h, pl[bas] - pl[bas - 1]) + dfs(bas + 1, son, 0, aft));
  } else {
    res += 0.5 * p *
           (min(h, pl[bas] - pl[bas - 1] - h) + dfs(bas + 1, son, 0, aft));
  }
  if (tut2[bas] > son) {
    res += 0.5 * (1 - p) *
           (pl[son] - pl[bas] +
            (aft ? min(h, pl[son + 1] - pl[son])
                 : min(h, pl[son + 1] - pl[son] - h)) +
            dfs(son + 1, son, 1, aft));
  } else {
    res += 0.5 * (1 - p) *
           (pl[tut2[bas] - 1] - pl[bas] +
            min(h, pl[tut2[bas]] - pl[tut2[bas] - 1]) +
            dfs(tut2[bas], son, 1, aft));
  }
  if (tut1[son] < bas) {
    res += 0.5 * p *
           (pl[son] - pl[bas] +
            (!bef ? min(h, pl[bas] - pl[bas - 1])
                  : min(h, pl[bas] - pl[bas - 1] - h)) +
            dfs(bas, bas - 1, bef, 0));
  } else {
    res += 0.5 * p *
           (pl[son] - pl[tut1[son] + 1] +
            min(h, pl[tut1[son] + 1] - pl[tut1[son]]) +
            dfs(bas, tut1[son], bef, 0));
  }
  if (aft == 1) {
    res += 0.5 * (1 - p) *
           (min(h, pl[son + 1] - pl[son]) + dfs(bas, son - 1, bef, 1));
  } else {
    res += 0.5 * (1 - p) *
           (min(h, pl[son + 1] - pl[son] - h) + dfs(bas, son - 1, bef, 1));
  }
  vis[bas][son][bef][aft] = 1;
  return dp[bas][son][bef][aft] = res;
}
void cright() {
  tut2[n + 1] = n + 1;
  for (int i = n; i >= 1; i--) {
    if (pl[i] + h > pl[i + 1]) {
      tut2[i] = tut2[i + 1];
    } else {
      tut2[i] = i + 1;
    }
  }
}
void cleft() {
  for (int i = 1; i <= n; i++) {
    if (pl[i] - h < pl[i - 1]) {
      tut1[i] = tut1[i - 1];
    } else {
      tut1[i] = i - 1;
    }
  }
}
int main() {
  scanf("%d %d %lf", &n, &h, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &pl[i]);
  }
  sort(pl + 1, pl + 1 + n);
  pl[0] = pl[1] - h;
  pl[n + 1] = pl[n] + h;
  cleft();
  cright();
  printf("%.9lf", dfs(1, n, 0, 1));
}
