#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  int n, l, t;
  cin >> n >> l >> t;
  vector<int> a(n);
  for (auto &ai : a) cin >> ai;
  a.resize(n * 2);
  for (int i = 0; i < n; i++) a[i + n] = a[i] + l;
  int q = t * 2 / l, r = t * 2 % l;
  long long ans = 1LL * n * (n - 1) * q;
  for (int left = 0, right = 0; left < n; left++) {
    while (a[right] - a[left] <= r) right++;
    ans += right - left - 1;
  }
  cout << ans * 0.25 << endl;
  return 0;
}
