#include <bits/stdc++.h>
using namespace std;
int n, m, s;
int a[105];
long double f[105][105 * 1005];
void dbg(int i, int j) { cout << f[i][j] - f[i][j - 1] << '\n'; }
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    s += a[i];
  }
  m--, s--;
  if (!m) {
    cout << 1;
    return 0;
  }
  for (int i = 0; i <= s; ++i) f[0][i] = m;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= s; ++j) {
      f[i][j] = f[i][j - 1];
      f[i][j] += f[i - 1][j - 1] / m;
      if (j > m + 1) f[i][j] -= f[i - 1][j - m - 2] / m;
      if (a[i] < j)
        f[i][j] -= (f[i - 1][j - a[i]] - f[i - 1][j - a[i] - 1]) / m;
      else if (a[i] == j)
        f[i][j] -= f[i - 1][0] / m;
    }
  }
  cout << fixed << setprecision(9) << f[n][s] + 1;
}
