#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000000;
int n, l, t, a[MAXN];
int main() {
  scanf("%d%d%d", &n, &l, &t);
  for (int i = (0); i < (n); i++) {
    scanf("%d", &a[i]);
    a[i + n] = a[i] + l;
  }
  double res = (t << 1) / l * (n - 1.) * n;
  t = (t << 1) % l;
  for (int i = (0); i < (n); i++) {
    res += lower_bound(a, a + (n << 1), a[i] + t + 1) - a - i - 1;
  }
  printf("%.13lf\n", res / 4);
  return 0;
}
