#include <bits/stdc++.h>
using namespace std;
long long a[2000005];
int main() {
  int n, l, t;
  cin >> n >> l >> t;
  for (int i = 0; i < n; ++i) scanf("%I64d", a + i);
  for (int i = 0; i < n; ++i) a[i + n] = a[i] + l;
  double ans = 0.25;
  long long cnt = 0;
  long long c = 2 * t / l, m = 2 * t % l;
  int x = 0;
  for (int i = 0, j = n; j < 2 * n; ++j) {
    while (a[i] + m < a[j]) ++i;
    cnt += c * (n - 1) + j - i;
  }
  ans *= cnt;
  printf("%.10lf\n", ans);
  return 0;
}
