#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int size(const T& c) {
  return c.size();
}
using namespace std;
const int maxn = 3000000 + 10;
int n;
long long l, t;
long long a[maxn];
double res;
int bnr_searchl(long long so) {
  int l = 1;
  int r = n * 3;
  int res;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (a[mid] >= so) {
      res = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return res;
}
int main() {
  cin >> n >> l >> t;
  t = t * 2;
  for (int i = (1), _b = (n); i <= _b; i++) {
    cin >> a[i];
    a[i + n] = a[i] + l;
    a[i + 2 * n] = a[i] + 2 * l;
  }
  for (int i = (n + 1), _b = (n * 2); i <= _b; i++) {
    res = res + (long long)(n - 1) * (t / l) * 0.25;
    long long st = t % l;
    int x = bnr_searchl(a[i] - st);
    res = res + (i - x) * 0.25;
  }
  printf("%0.6f", res);
  fclose(stdin);
  fclose(stdout);
  return 0;
}
