#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[110000];
double f[110000];
double g[110000];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i <= n * m; i++) {
    g[i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n * m; j++) {
      double c = g[j - 1];
      if (j - m - 1 >= 0) {
        c -= g[j - m - 1];
      }
      int cnt = min(m, j);
      if (cnt >= a[i - 1]) {
        cnt--;
        int p = j - a[i - 1];
        c -= g[p];
        if (p > 0) {
          c += g[p - 1];
        }
      }
      if (cnt == 0) {
        f[j] = 0;
      } else {
        f[j] = c / (m - 1);
      }
    }
    g[0] = 0;
    for (int j = 1; j <= n * m; j++) {
      g[j] = g[j - 1] + f[j];
    }
  }
  int tot = 0;
  for (int i = 0; i < n; i++) {
    tot += a[i];
  }
  double ans = g[tot - 1] * (m - 1) + 1;
  printf("%.15lf\n", ans);
  return 0;
}
