#include <bits/stdc++.h>
using namespace std;
double dp[110][100001], sk, ans, second[110][100001];
int m, n, k[2000];
int main() {
  cin >> n >> m;
  if (m == 1) {
    cout << "1";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    cin >> k[i];
    sk += k[i];
  }
  dp[0][0] = m - 1;
  for (int i = 0; i <= m * n; i++) second[0][i] = m - 1;
  for (int i = 1; i < m * n; i++) dp[0][i] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m * n; j++) {
      if (j < k[i] && j - min(m, j) - 1 < 0)
        dp[i][j] = second[i - 1][j - 1] / (m - 1);
      else if (j < k[i])
        dp[i][j] =
            (second[i - 1][j - 1] - second[i - 1][j - min(m, j) - 1]) / (m - 1);
      else if (j - min(m, j) - 1 < 0)
        dp[i][j] = (second[i - 1][j - 1] - dp[i - 1][j - k[i]]) / (m - 1);
      else
        dp[i][j] = (second[i - 1][j - 1] - second[i - 1][j - min(m, j) - 1] -
                    dp[i - 1][j - k[i]]) /
                   (m - 1);
      second[i][j] = second[i][j - 1] + dp[i][j];
    }
  for (int i = 0; i < sk; i++) ans += dp[n][i];
  cout << fixed << setprecision(10) << ans + 1;
}
