#include <bits/stdc++.h>
using namespace std;
const int INF = 987654321;
const long long LINF = 1e15;
const int N_ = 2500005;
long long N, L, B;
long long P, Q;
long long D[N_];
double res;
int main() {
  int i, j, k;
  scanf("%I64d%I64d%I64d", &N, &L, &B);
  P = (B * 2) / L;
  Q = (B * 2) % L;
  res += (double)P * (double)N * (double)(N - 1) * 2;
  for (i = 1; i <= N; i++) {
    scanf("%I64d", &D[i]);
  }
  for (i = 1; i <= N; i++) D[i + N] = D[i] + L;
  for (i = 1, k = 2; i <= N; i++) {
    while (k <= 2 * N && D[k] <= D[i] + Q) ++k;
    res += (double)(k - i - 1);
  }
  for (i = 2 * N, k = 2 * N - 1; i > N; i--) {
    while (k > 0 && D[k] >= D[i] - Q) --k;
    res += (double)(i - k - 1);
  }
  if (res >= (1ll << 30)) res += 1;
  printf("%.10lf\n", res / 8.);
  return 0;
}
