#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
inline void add(int &a, int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
}
int a[2005], from[2005], to[2005];
double dp[2005][2005][2][2];
int main() {
  int T, i, j, k, m, n;
  double p;
  int h;
  scanf("%d%d%lf", &n, &h, &p);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  a[0] = a[1] - h, a[n + 1] = a[n] + h;
  for (i = 1; i <= n; i = j + 1) {
    j = i;
    while (j <= n && a[j + 1] - a[j] < h) j++;
    for (k = i; k <= j; k++) from[k] = i, to[k] = j;
  }
  double ans = 0;
  dp[1][n][0][1] = 1;
  for (int len = n; len >= 1; len--) {
    for (int first = 1; first + len - 1 <= n; first++) {
      int second = first + len - 1;
      for (i = 0; i < 2; i++)
        for (j = 0; j < 2; j++) {
          double &v = dp[first][second][i][j];
          if (v <= 0) continue;
          if (i == 1 && from[first] < first) {
            ans += (a[first] - a[first - 1]) * v;
            if (len == 1) {
              if (j == 1)
                ans += min(a[first + 1] - a[first], h) * v;
              else
                ans += min(a[first + 1] - a[first], 2 * h) * v;
            }
            dp[first + 1][second][i][j] += v;
            continue;
          }
          if (j == 0 && to[second] > second) {
            ans += (a[second + 1] - a[second]) * v;
            if (len == 1) {
              if (i == 0)
                ans += min(a[second] - a[second - 1], h) * v;
              else
                ans += min(a[second] - a[second - 1], 2 * h) * v;
            }
            dp[first][second - 1][i][j] += v;
            continue;
          }
          if (i == 1) {
            double t = min(a[first] - a[first - 1], 2 * h) * v * p;
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first + 1][second][0][j] += v * 0.5 * p;
            t = h * v * (1 - p);
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first + 1][second][1][j] += v * 0.5 * (1 - p);
          } else {
            double t = min(a[first] - a[first - 1], h) * v * p;
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first + 1][second][0][j] += v * 0.5 * p;
            dp[first + 1][second][1][j] += v * 0.5 * (1 - p);
          }
          if (j == 0) {
            double t = min(a[second + 1] - a[second], 2 * h) * v * (1 - p);
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first][second - 1][i][1] += v * 0.5 * (1 - p);
            t = h * v * p;
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first][second - 1][i][0] += v * 0.5 * p;
          } else {
            double t = min(a[second + 1] - a[second], h) * v * (1 - p);
            if (len == 1)
              ans += t;
            else
              ans += 0.5 * t;
            dp[first][second - 1][i][1] += v * 0.5 * (1 - p);
            dp[first][second - 1][i][0] += v * 0.5 * p;
          }
        }
    }
  }
  printf("%.9lf\n", ans);
  return 0;
}
