#include <bits/stdc++.h>
double pref[100001];
double E[101][100001];
int main() {
  int n, m;
  std::cin >> n >> m;
  std::vector<int> x(n + 1);
  int S = 0;
  for (int i = 1; i <= n; i++) {
    std::cin >> x[i];
    S += x[i];
  }
  for (int i = 1; i <= m; i++) {
    E[1][i] = E[1][i - 1];
    if (i != x[1]) E[1][i] += 1;
  }
  for (int i = 2; i <= n; i++) {
    for (int t = i; t <= i * m; t++) {
      int start = std::max(i - 2, t - m - 1);
      int end = std::min(t - 1, (i - 1) * m);
      E[i][t] = E[i - 1][end] - E[i - 1][start];
      if (t - x[i] > 0 && t - x[i] <= (i - 1) * m)
        E[i][t] -= E[i - 1][t - x[i]] - E[i - 1][t - x[i] - 1];
      E[i][t] /= (m - 1);
      E[i][t] += E[i][t - 1];
    }
  }
  double res = E[n][S - 1] + 1.0;
  std::cout << std::fixed << std::setprecision(12) << res << std::endl;
  return 0;
}
