#include <bits/stdc++.h>
using namespace std;
int n, h;
double p;
int A[2010];
const int LEFT = 1;
const int RIGHT = 2;
const int NEITHER = 0;
double dp[2010][2010][2][2];
double solve(int s, int e, bool left_in, bool right_in) {
  if (s > e) return 0.0;
  double &ans = dp[s][e][left_in][right_in];
  if (ans == ans) return ans;
  double left_fall_right;
  double left_fall_left;
  double right_fall_left;
  double right_fall_right;
  int fall = NEITHER;
  if (s > 0 && left_in && A[s - 1] + h > A[s]) fall = LEFT;
  if (e < n - 1 && right_in && A[e + 1] - h < A[e]) fall = RIGHT;
  if (s == e) {
    left_fall_left = h;
    if (s > 0 && A[s - 1] > A[s] - h) left_fall_left = A[s] - A[s - 1];
    if (s > 0 && left_in && A[s - 1] + h > A[s] - h)
      left_fall_left = A[s] - A[s - 1] - h;
    right_fall_right = h;
    if (e < n - 1 && A[e + 1] < A[e] + h) right_fall_right = A[e + 1] - A[e];
    if (e < n - 1 && right_in && A[e + 1] - h < A[e] + h)
      right_fall_right = -A[e] + A[e + 1] - h;
    if (fall == LEFT) return ans = right_fall_right;
    if (fall == RIGHT) return ans = left_fall_left;
    return ans = p * left_fall_left + (1 - p) * right_fall_right;
  }
  int ground = h;
  if (s < n - 1 && A[s] + h > A[s + 1]) ground = A[s + 1] - A[s];
  left_fall_right = ground + solve(s + 1, e, true, right_in);
  ground = h;
  if (s > 0 && A[s] - h < A[s - 1]) ground = A[s] - A[s - 1];
  if (s > 0 && left_in && A[s] - h < A[s - 1] + h) ground = A[s] - A[s - 1] - h;
  left_fall_left = ground + solve(s + 1, e, false, right_in);
  ground = h;
  if (e > 0 && A[e] - h < A[e - 1]) ground = A[e] - A[e - 1];
  right_fall_left = ground + solve(s, e - 1, left_in, true);
  ground = h;
  if (e < n - 1 && A[e] + h > A[e + 1]) ground = A[e + 1] - A[e];
  if (e < n - 1 && right_in && A[e] + h > A[e + 1] - h)
    ground = -A[e] + A[e + 1] - h;
  right_fall_right = ground + solve(s, e - 1, left_in, false);
  if (fall == LEFT) return ans = left_fall_right;
  if (fall == RIGHT) return ans = right_fall_left;
  return ans = 0.5 * (p * left_fall_left + (1 - p) * left_fall_right) +
               0.5 * (p * right_fall_left + (1 - p) * right_fall_right);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> h >> p;
  memset(dp, -1, sizeof dp);
  for (int i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  cout << fixed << setprecision(9) << solve(0, n - 1, 0, 0);
  return 0;
}
