#include <bits/stdc++.h>
using namespace std;
double avg[2001][2001][2][2];
int next_right[2000];
int next_left[2000];
int pos[2000];
int n, h;
double p;
double getleft(int index, int fall_to_left) {
  if (index == 0)
    return h;
  else if (!fall_to_left)
    return min(pos[index] - pos[index - 1], h);
  else
    return min(max(0, pos[index] - pos[index - 1] - h), h);
}
double getright(int index, int fall_to_right) {
  if (index == n - 1)
    return h;
  else if (!fall_to_right)
    return min(pos[index + 1] - pos[index], h);
  else
    return min(max(0, pos[index + 1] - pos[index] - h), h);
}
double solve(int left, int right, int fall_to_left, int fall_to_right) {
  if (avg[left][right][fall_to_left][fall_to_right] >= 0)
    return avg[left][right][fall_to_left][fall_to_right];
  if (right == left + 1)
    return avg[left][right][fall_to_left][fall_to_right] =
               p * getleft(left, fall_to_left) +
               (1 - p) * getright(left, fall_to_right);
  double result = 0;
  result +=
      0.5 * p *
      (getleft(left, fall_to_left) + solve(left + 1, right, 0, fall_to_right));
  result += 0.5 * (1 - p) *
            (getright(right - 1, fall_to_right) +
             solve(left, right - 1, fall_to_left, 0));
  double temp;
  int ileft = next_right[left];
  if (ileft >= right)
    temp = getright(right - 1, fall_to_right) + pos[right - 1] - pos[left];
  else
    temp =
        pos[ileft - 1] + h - pos[left] + solve(ileft, right, 1, fall_to_right);
  result += 0.5 * (1 - p) * temp;
  int iright = next_left[right - 1];
  if (iright < left)
    temp = pos[right - 1] - (pos[left] - getleft(left, fall_to_left));
  else
    temp = pos[right - 1] - (pos[iright + 1] - h) +
           solve(left, iright + 1, fall_to_left, 1);
  result += 0.5 * p * temp;
  avg[left][right][fall_to_left][fall_to_right] = result;
  return result;
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin >> n >> h >> p;
  for (int i = 0; i < n; i++) cin >> pos[i];
  sort(pos, pos + n);
  for (int left = 0; left < n; left++)
    for (int right = 1; right <= n; right++)
      for (int fall_to_left = 0; fall_to_left < 2; fall_to_left++)
        for (int fall_to_right = 0; fall_to_right < 2; fall_to_right++)
          avg[left][right][fall_to_left][fall_to_right] = -1;
  int i = 0;
  int last = i;
  while (i < n) {
    i++;
    while (i < n && pos[i] - pos[i - 1] < h) i++;
    for (int j = last; j < i; j++) next_right[j] = i;
    last = i;
  }
  i = n - 1;
  last = i;
  while (i >= 0) {
    i--;
    while (i >= 0 && pos[i + 1] - pos[i] < h) i--;
    for (int j = last; j > i; j--) next_left[j] = i;
    last = i;
  }
  cout << fixed << setprecision(10) << solve(0, n, 0, 0) << endl;
  return 0;
}
