#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
const int MAXM = 1005;
const int MAX2 = MAXN * MAXM;
double ans[2][MAX2];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  int cur = 0, prev = 1;
  cin >> n >> m;
  if (m == 1) {
    cout << 1 << endl;
    return 0;
  }
  ans[cur][0] = m - 1;
  int score = 0;
  int MAXJ = n * m;
  for (int i = 1; i <= n; i++) {
    swap(cur, prev);
    int r;
    cin >> r;
    score += r;
    double sum = 0;
    ans[cur][0] = 0;
    for (int j = 1; j <= MAXJ; j++) {
      sum += ans[prev][j - 1];
      if (j - m - 1 >= 0) sum -= ans[prev][j - m - 1];
      double temp = sum;
      if (j - r >= 0) temp -= ans[prev][j - r];
      ans[cur][j] = temp / (m - 1);
    }
  }
  double sum = 0;
  for (int i = 1; i < score; i++) sum += ans[cur][i];
  cout << fixed << setprecision(12) << sum + 1 << "\n";
  return 0;
}
