#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int MAXM = 1024;
vector<long double> er, ei;
void FFT(vector<long double> &xr, vector<long double> &xi, long double d = 1) {
  int n = (int)(xr).size();
  er.resize(n), ei.resize(n);
  for (int i = (0); i < (n); ++i)
    er[i] = cos(2 * acos(-1.) * i / n), ei[i] = -d * sin(2 * acos(-1.) * i / n);
  for (int i = (0); i < (n); ++i) {
    int j = 0;
    for (int k = 1; k < n; k <<= 1, j <<= 1)
      if (k & i) j++;
    j >>= 1;
    if (i < j) {
      swap(xr[i], xr[j]);
      swap(xi[i], xi[j]);
    }
  }
  int k = 0;
  while ((1 << k) < n) k++;
  for (int s = 1; s < n; s <<= 1) {
    --k;
    for (int i = 0; i < n; i += 2 * s)
      for (int j = (0); j < (s); ++j) {
        long double ur = xr[i + j], ui = xi[i + j];
        long double vr =
                        xr[i + j + s] * er[j << k] - xi[i + j + s] * ei[j << k],
                    vi =
                        xr[i + j + s] * ei[j << k] + xi[i + j + s] * er[j << k];
        xr[i + j] = ur + vr, xi[i + j] = ui + vi;
        xr[i + j + s] = ur - vr, xi[i + j + s] = ui - vi;
      }
  }
}
pair<vector<long double>, vector<long double> > convolution(
    vector<long double> ar, vector<long double> ai, vector<long double> br,
    vector<long double> bi) {
  int n = 1;
  while (n < (int)(ar).size()) n *= 2;
  FFT(ar, ai);
  FFT(br, bi);
  for (int i = (0); i < (n); ++i) {
    long double ur = (ar[i] * br[i] - ai[i] * bi[i]) / n;
    long double ui = (ar[i] * bi[i] + ai[i] * br[i]) / n;
    ar[i] = ur, ai[i] = ui;
  }
  FFT(ar, ai, -1);
  return {ar, ai};
}
int main() {
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(40);
  int n, m;
  cin >> n >> m;
  if (m == 1) {
    cout << "1.0\n";
    return 0;
  }
  vector<int> val(n);
  for (int i = 0; i < (n); ++i) cin >> val[i];
  vector<vector<long double> > res;
  for (int i = 0; i < (n); ++i) {
    vector<long double> mult(MAXM);
    for (int pos = (1); pos <= (m); ++pos) {
      if (pos == val[i]) {
        mult[pos] = 0;
      } else {
        mult[pos] = 1. / (m - 1);
      }
    }
    res.push_back(mult);
  }
  int bound = MAXM;
  while ((int)(res).size() > 1) {
    for (int i = 0; i < ((int)(res).size() / 2); ++i) {
      vector<long double> con(2 * bound);
      vector<long double> ar(2 * bound), ai(2 * bound), br(2 * bound),
          bi(2 * bound);
      for (int j = 0; j < (bound); ++j)
        ar[j] = res[2 * i][j], br[j] = res[2 * i + 1][j];
      con = convolution(ar, ai, br, bi).first;
      res[i] = con;
    }
    if ((int)(res).size() % 2) {
      res[(int)(res).size() / 2] = vector<long double>(2 * bound);
      for (int j = 0; j < (bound); ++j)
        res[(int)(res).size() / 2][j] = res[(int)(res).size() - 1][j];
    }
    res.resize(((int)(res).size() + 1) / 2);
    bound *= 2;
  }
  int sum = 0;
  for (int i = 0; i < (n); ++i) sum += val[i];
  const auto &vec = res[0];
  double ans = 0;
  for (int i = 0; i < (sum); ++i) ans += vec[i];
  ans = 1 + ans * (m - 1);
  cout << ans << endl;
  return 0;
}
