#include <bits/stdc++.h>
using namespace std;
const int NMax = 1001000;
int N, L, T, A[NMax];
long long calc(int a, int b) {
  double point = (double)((a - b) > 0 ? (a - b) : (-(a - b))) / 2;
  double tmp = T;
  tmp -= point;
  if (tmp <= -(1e-6f)) return 0;
  return (long long)(tmp * 2 / ((double)(L))) + 1;
}
long long calc1(int a, int b) {
  b += L;
  double point = (double)((a - b) > 0 ? (a - b) : (-(a - b))) / 2;
  double tmp = T;
  tmp -= point;
  if (tmp <= -(1e-6f)) return 0;
  return (long long)(tmp * 2 / ((double)(L))) + 1;
}
int main() {
  scanf("%d%d%d", &N, &L, &T);
  for (int i = 1; i <= N; i++) scanf("%d", A + i);
  double ret = 0;
  for (int i = 2; i <= N; i++) {
    int l = 0, r = i;
    long long go = calc(A[i], A[1]);
    while (l < r) {
      if (l + 1 == r) break;
      int mid = (l + r) >> 1;
      if (calc(A[i], A[mid]) == go)
        l = mid;
      else
        r = mid;
    }
    ret += (double)l * go + (double)(i - l - 1) * (go + 1);
    l = 0, r = i;
    go = calc1(A[i], A[1]);
    while (l < r) {
      if (l + 1 == r) break;
      int mid = (l + r) >> 1;
      if (calc1(A[i], A[mid]) == go)
        l = mid;
      else
        r = mid;
    }
    ret += (double)l * go + (double)(i - l - 1) * (go - 1);
  }
  printf("%.10lf\n", (ret) / 4);
  getchar();
  getchar();
  return 0;
}
