#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const long double EPS = 1e-9;
const int INF = 1e9 + 7;
long double dp[4][2002][2002];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(7);
  int n, h;
  long double p;
  cin >> n >> h >> p;
  vector<int> xs(n);
  for (int i = 0; i < n; ++i) {
    cin >> xs[i];
  }
  sort(xs.begin(), xs.end());
  for (int l = n - 1; l >= 0; --l) {
    for (int r = l; r < n; ++r) {
      for (int st = 0; st < 4; ++st) {
        dp[st][l][r] = 0.;
        int hl = st & 1;
        int hr = st & 2;
        int liml = (l == 0 ? -INF : xs[l - 1] + (hl ? h : 0));
        int limr = (r == n - 1 ? INF : xs[r + 1] - (hr ? h : 0));
        int add_ll = max(0, min(limr, xs[l]) - max(liml, xs[l] - h));
        int add_lr = max(0, min(limr, xs[l] + h) - max(liml, xs[l]));
        int add_rl = max(0, min(limr, xs[r]) - max(liml, xs[r] - h));
        int add_rr = max(0, min(limr, xs[r] + h) - max(liml, xs[r]));
        if (hl && l > 0 && xs[l] - xs[l - 1] < h) {
          dp[st][l][r] = (l == r ? 0 : dp[st][l + 1][r]) + (long double)add_lr;
          continue;
        }
        if (hr && r < n - 1 && xs[r + 1] - xs[r] < h) {
          dp[st][l][r] = (l == r ? 0 : dp[st][l][r - 1]) + (long double)add_rl;
          continue;
        }
        if (l == r) {
          dp[st][l][r] =
              (long double)add_ll * p + (long double)add_lr * (1. - p);
          continue;
        }
        dp[st][l][r] += (dp[st & 2][l + 1][r] + (long double)add_ll) * p;
        dp[st][l][r] += (dp[st | 1][l + 1][r] + (long double)add_lr) * (1. - p);
        dp[st][l][r] += (dp[st & 1][l][r - 1] + (long double)add_rr) * (1. - p);
        dp[st][l][r] += (dp[st | 2][l][r - 1] + (long double)add_rl) * p;
        dp[st][l][r] *= 0.5;
      }
    }
  }
  cout << dp[0][0][n - 1];
  return 0;
};
