#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(vector<T> v) {
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
int main() {
  int n, m, i, competition;
  cin >> n >> m;
  if (m == 1) {
    cout << 1 << endl;
    return 0;
  }
  vector<int> score(n);
  for (i = 0; i < n; i++) cin >> score[i];
  vector<long double> v(n * m + 1);
  v[0] = 1;
  for (competition = 0; competition < n; competition++) {
    vector<long double> nv(n * m + 1);
    for (i = 0; i < n * m; i++) {
      nv[i + 1] = nv[i];
      long double tmp = v[i];
      if ((i - score[competition]) >= 0) tmp += 1 * v[(i - score[competition])];
      ;
      if ((i - m) >= 0) tmp += -1 * v[(i - m)];
      ;
      if ((i - score[competition] + 1) >= 0)
        tmp += -1 * v[(i - score[competition] + 1)];
      ;
      tmp /= m - 1;
      nv[i + 1] += tmp;
    }
    v = nv;
  }
  int sum = 0;
  for (i = 0; i < n; i++) sum += score[i];
  long double res = 0;
  for (i = 0; i < sum; i++) res += v[i];
  cout.precision(10);
  cout << res * (m - 1) + 1 << endl;
  return 0;
}
