#include <bits/stdc++.h>
using namespace std;
long double dp1[100001], dp2[100001];
long double s[100002];
int main() {
  long double* dp[2];
  dp[0] = dp1;
  dp[1] = dp2;
  int n, m;
  cin >> n >> m;
  vector<int> r(n);
  int tot = 0;
  for (int i = 0; i < n; ++i) {
    cin >> r[i];
    r[i]--;
    tot += r[i];
  }
  dp[0][0] = 1.;
  for (int i = 0; i < n; ++i) {
    s[0] = 0;
    for (int j = 1; j <= tot; ++j) {
      dp[0][j - 1] /= double(m - 1);
      s[j] = s[j - 1] + dp[0][j - 1];
    }
    for (int j = 0; j < tot; ++j) {
      dp[1][j] += s[j + 1] - s[max(0, j + 1 - m)];
      dp[1][j + r[i]] -= dp[0][j];
    }
    swap(dp[0], dp[1]);
    for (int j = 0; j < tot; ++j) {
      dp[1][j] = 0.;
    }
  }
  double ans = 0.;
  for (int i = 0; i < tot; ++i) {
    ans += dp[0][i];
  }
  ans *= m - 1;
  cout << fixed << setprecision(12) << ans + 1.;
  return 0;
}
