#include <bits/stdc++.h>
using namespace std;
int n, l, t, a[4000000];
long long ans;
int main() {
  scanf("%d%d%d", &n, &l, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    ans += (n - 1) * ((2 * t) / l);
    int x = (2 * t) % l;
    int L = i + 1, r = n + i - 1, mid, pos = i;
    while (L <= r) {
      mid = L + r >> 1;
      if (a[mid] <= x + a[i])
        L = mid + 1, pos = mid;
      else
        r = mid - 1;
    }
    ans += pos - i;
    a[n + i] = l + a[i];
  }
  printf("%.10lf\n", ans * 0.25);
  return 0;
}
