#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const string debug_line = "yolo";
const double PI = 4 * atan(1);
double dp[2010][2010][2][2];
int first[2010];
int r1[2010];
int l1[2010];
double p;
int h;
double tryall(int l, int r, int dl, int dr) {
  if (l > r) {
    return 0;
  } else if (dp[l][r][dl][dr] != -1) {
    return dp[l][r][dl][dr];
  } else {
    double answer1 = 0;
    if (dr == 0) {
      answer1 = (answer1 + (1 - p) * min(h, first[r + 1] - first[r] - h));
    } else {
      answer1 = (answer1 + (1 - p) * min(h, first[r + 1] - first[r]));
    }
    answer1 = (answer1 + (1 - p) * tryall(l, r - 1, dl, 1));
    int limitr = max(l, r - l1[r] + 1);
    if (limitr != l) {
      answer1 = (answer1 + p * (first[r] - first[limitr] + h));
      answer1 = (answer1 + p * tryall(l, limitr - 1, dl, 0));
    } else {
      if (dl == 0) {
        answer1 = (answer1 +
                   p * (min(h, first[l] - first[l - 1]) + first[r] - first[l]));
      } else {
        answer1 = (answer1 + p * (min(h, first[l] - first[l - 1] - h) +
                                  first[r] - first[l]));
      }
    }
    int limitl = min(r, l + r1[l] - 1);
    if (limitl != r) {
      answer1 = (answer1 + (1 - p) * (first[limitl] - first[l] + h));
      answer1 = (answer1 + (1 - p) * tryall(limitl + 1, r, 1, dr));
    } else {
      if (dr == 1) {
        answer1 = (answer1 + (1 - p) * (min(h, first[r + 1] - first[r]) +
                                        first[r] - first[l]));
      } else {
        answer1 = (answer1 + (1 - p) * (min(h, first[r + 1] - first[r] - h) +
                                        first[r] - first[l]));
      }
    }
    if (dl == 1) {
      answer1 = (answer1 + p * min(h, first[l] - first[l - 1] - h));
    } else {
      answer1 = (answer1 + p * min(h, first[l] - first[l - 1]));
    }
    answer1 = (answer1 + p * tryall(l + 1, r, 0, dr));
    answer1 = answer1 / 2;
    dp[l][r][dl][dr] = answer1;
    return dp[l][r][dl][dr];
  }
}
int main() {
  int n;
  scanf("%d%d", &n, &h);
  scanf("%lf", &p);
  for (int(i) = (0); (i) < (2010); ++(i)) {
    for (int(j) = (0); (j) < (2010); ++(j)) {
      for (int(k) = (0); (k) < (2); ++(k)) {
        for (int(l) = (0); (l) < (2); ++(l)) {
          dp[i][j][k][l] = -1;
        }
      }
    }
  }
  first[n] = 500000000;
  first[n + 1] = -500000000;
  for (int(i) = (0); (i) < (n); ++(i)) {
    int temp;
    scanf("%d", &temp);
    first[i] = temp;
  }
  n = n + 2;
  sort(first, first + n);
  l1[0] = 1;
  for (int(i) = (1); (i) < (n); ++(i)) {
    if (first[i] - first[i - 1] < h) {
      l1[i] = l1[i - 1] + 1;
    } else {
      l1[i] = 1;
    }
  }
  r1[n] = 1;
  for (int(i) = (n - 1); (i) > (-1); --(i)) {
    if (first[i + 1] - first[i] < h) {
      r1[i] = r1[i + 1] + 1;
    } else {
      r1[i] = 1;
    }
  }
  double answer1 = tryall(1, n - 2, 0, 1);
  printf("%.6lf\n", answer1);
  return 0;
}
