#include <bits/stdc++.h>
using namespace std;
const int NMAX = 1001000;
long long a[NMAX * 2];
long long n, l, t;
long long cnt(int i, int j) {
  long long v = (a[i] - a[j] + t * 2 + l) / l;
  return v;
}
long double ans(int i) {
  int lo = i + 2, hi = i + n;
  long long tv = cnt(i, i + 1);
  while (lo < hi) {
    int m = (lo + hi) / 2;
    if (cnt(i, m) < tv) {
      hi = m;
    } else {
      lo = m + 1;
    }
  }
  if (hi == i + n) {
    long double v = (long double)tv * (n - 1) / 4;
    return v;
  }
  long double v =
      (long double)((tv - 1) * (i + n - hi) + tv * (hi - i - 1)) / 4;
  return v;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> l >> t;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    a[i + n] = a[i] + l;
  }
  long double out = 0;
  for (int i = 0; i < n; ++i) {
    out += ans(i);
  }
  cout << fixed << setprecision(5) << out << endl;
  return 0;
}
