#include <bits/stdc++.h>
using namespace std;
double pos[2005];
double dp[2005][2005][2][2];
int pre[2005][2];
int n;
double p, h;
void precompute() {
  pre[n][1] = n + 1;
  for (int i = n - 1; i >= 1; i--) {
    if (pos[i] + h > pos[i + 1])
      pre[i][1] = pre[i + 1][1];
    else
      pre[i][1] = i + 1;
  }
  pre[1][0] = 0;
  for (int i = 2; i <= n; i++) {
    if (pos[i] - h < pos[i - 1])
      pre[i][0] = pre[i - 1][0];
    else
      pre[i][0] = i - 1;
  }
}
double cal(int s, int e, int left, int right) {
  if (s > e) return 0;
  if (dp[s][e][left][right] != -1) return dp[s][e][left][right];
  double ret = 0, tem;
  if (left == 0)
    tem = (pos[s] - max(pos[s] - h, pos[s - 1]));
  else
    tem = (pos[s] - max(pos[s] - h, pos[s - 1] + h));
  tem = 0.5 * (1 - p) * (cal(s + 1, e, 0, right) + tem);
  ret += tem;
  if (right == 1)
    tem = min(pos[e + 1] - pos[e], h);
  else
    tem = min(pos[e + 1] - h - pos[e], h);
  tem = 0.5 * p * (cal(s, e - 1, left, 1) + tem);
  ret += tem;
  if (pre[s][1] > e) {
    if (right == 1)
      tem = (pos[e] - pos[s] + min(pos[e + 1] - pos[e], h));
    else
      tem = (pos[e] - pos[s] + min(pos[e + 1] - h - pos[e], h));
  } else
    tem = (pos[pre[s][1] - 1] + h - pos[s]);
  tem = 0.5 * p * (cal(pre[s][1], e, 1, right) + tem);
  ret += tem;
  if (pre[e][0] < s) {
    if (left == 0)
      tem = (pos[e] - max(pos[s] - h, pos[s - 1]));
    else
      tem = (pos[e] - max(pos[s] - h, pos[s - 1] + h));
  } else
    tem = (pos[e] + h - pos[pre[e][0] + 1]);
  tem = 0.5 * (1 - p) * (cal(s, pre[e][0], left, 0) + tem);
  ret += tem;
  dp[s][e][left][right] = ret;
  return ret;
}
int main() {
  for (int i = 0; i < 2005; i++)
    for (int j = 0; j < 2005; j++)
      for (int k = 0; k < 2; k++)
        for (int m = 0; m < 2; m++) dp[i][j][k][m] = -1;
  scanf("%d", &n);
  scanf("%lf%lf", &h, &p);
  p = 1 - p;
  pos[0] = -1000000007;
  pos[n + 1] = 1000000007;
  for (int i = 1; i <= n; i++) scanf("%lf", &pos[i]);
  sort(pos + 1, pos + n + 1);
  precompute();
  double ans = 0.5 * (1 - p) * (cal(2, n, 0, 1) + h);
  ans += 0.5 * p * (cal(1, n - 1, 0, 1) + h);
  double tem;
  if (pre[1][1] > n)
    tem = (pos[n] + h - pos[1]);
  else
    tem = (pos[pre[1][1] - 1] + h - pos[1]);
  tem = 0.5 * p * (cal(pre[1][1], n, 1, 1) + tem);
  ans += tem;
  if (pre[n][0] < 1)
    tem = (pos[n] + h - pos[1]);
  else
    tem = (pos[n] + h - pos[pre[n][0] + 1]);
  tem = 0.5 * (1 - p) * (cal(1, pre[n][0], 0, 0) + tem);
  ans += tem;
  printf("%lf\n", ans);
  return 0;
}
