#include <bits/stdc++.h>
using namespace std;
int n, m, fdsjfdsjfdsj[10000];
long double p[2][100000];
long double sum[100000];
int main() {
  cin >> n >> m;
  m--;
  for (int i = 1; i <= n; i++) cin >> fdsjfdsjfdsj[i], fdsjfdsjfdsj[i]--;
  int cur = 0, nxt = 1;
  p[cur][0] = 1;
  for (int i = 1; i <= n; i++, swap(cur, nxt)) {
    sum[0] = 0;
    for (int j = 0; j <= i * m; j++) sum[j + 1] = p[cur][j] + sum[j];
    for (int j = 0; j <= i * m; j++) {
      if (j < fdsjfdsjfdsj[i]) {
        p[nxt][j] = (sum[j + 1] - sum[max(0, j - m)]) / (m);
      } else {
        p[nxt][j] =
            (sum[j + 1] - sum[max(0, j - m)] - p[cur][j - fdsjfdsjfdsj[i]]) /
            (m);
      }
    }
    memset(p[cur], 0, sizeof(p[cur]));
  }
  int tot = 0;
  for (int i = 1; i <= n; i++) tot += fdsjfdsjfdsj[i];
  long double res = 0;
  for (int i = 0; i < tot; i++) res += p[cur][i];
  cout << setprecision(10) << fixed << res * m + 1 << endl;
  return 0;
}
