#include <bits/stdc++.h>
using namespace std;
int N;
long long L, T;
int A[2000010];
int main() {
  int l_, t_;
  while (3 == scanf("%d%d%d", &N, &l_, &t_)) {
    L = l_;
    T = t_;
    for (int i = 0; i < (int)(N); i++) {
      scanf("%d", &A[i]);
      A[N + i] = A[i] + L;
    }
    long long X = 2 * T;
    long long Y = X % L;
    double always = double(N - 1) * (X / L);
    double ans1 = 0;
    double ans2 = 0;
    int j = 0;
    for (int i = 0; i < (int)(N); i++) {
      while (j < i + N && A[j] - A[i] <= Y) ++j;
      ans1 += j - i - 1;
      ans2 += always;
    }
    printf("%.10f\n", (ans1 + ans2) / 4.0);
  }
  return 0;
}
