#include <bits/stdc++.h>
using namespace std;
int pos[2010];
double dp[2010][2010][2][2];
bool flag[2010][2010][2][2];
double getProb(int st, int h, double p, int l, int r) {
  int lft = pos[st - 1], rt = pos[st + 1];
  if (l == 1) lft += h;
  if (r == 1) rt -= h;
  return p * min(h, abs(pos[st] - lft)) + (1 - p) * min(h, abs(rt - pos[st]));
}
double expect(int st, int end, int h, double p, int l, int r) {
  if (st == end) {
    return getProb(st, h, p, l, r);
  }
  double& ret = dp[st][end][l][r];
  if (flag[st][end][l][r]) return ret;
  int lft = pos[st - 1], rt = pos[end + 1];
  if (l == 1) lft += h;
  if (r == 1) rt -= h;
  double lft_prob =
      p * (min(h, abs(pos[st] - lft)) + expect(st + 1, end, h, p, 0, r));
  int st_ = st + 1;
  while (st_ <= end && (pos[st_] - pos[st_ - 1] < h)) st_++;
  double len;
  len = pos[st_ - 1] - pos[st];
  if (st_ == end + 1) {
    len += min(h, abs(rt - pos[end]));
  } else {
    len += h;
    len += expect(st_, end, h, p, 1, r);
  }
  lft_prob += (1 - p) * len;
  lft_prob *= 0.5;
  double rt_prob =
      (1 - p) * (min(h, abs(rt - pos[end])) + expect(st, end - 1, h, p, l, 0));
  int end_ = end - 1;
  while (end_ >= st && (pos[end_ + 1] - pos[end_] < h)) end_--;
  len = pos[end] - pos[end_ + 1];
  if (end_ == st - 1) {
    len += min(h, abs(pos[st] - lft));
  } else {
    len += h;
    len += expect(st, end_, h, p, l, 1);
  }
  rt_prob += p * len;
  rt_prob *= 0.5;
  ret = rt_prob + lft_prob;
  flag[st][end][l][r] = true;
  return ret;
}
int main() {
  int i, j, k, l, m, n, t;
  int h;
  scanf("%d", &n);
  scanf("%d", &h);
  double p;
  scanf("%lf", &p);
  for (i = 1; i <= n; i++) scanf("%d", &pos[i]);
  sort(pos + 1, pos + n + 1);
  pos[0] = INT_MIN / 10;
  pos[n + 1] = INT_MAX / 10;
  printf("%0.9lf", expect(1, n, h, p, 0, 0));
  return 0;
}
