#include <bits/stdc++.h>
using namespace std;
double dp[105][100005];
int xs[105];
int main() {
  int n, m, score = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> xs[i];
    score += xs[i];
  }
  int j = 1;
  for (; j <= m; j++) {
    dp[1][j] = dp[1][j - 1];
    if (j != xs[1]) dp[1][j] += 1;
  }
  for (; j <= n * m; j++) {
    dp[1][j] = dp[1][m];
  }
  for (int i = 2; i <= n; i++) {
    for (int j = i; j <= n * m; j++) {
      if (j - xs[i] < i - 1)
        dp[i][j] = dp[i][j - 1] + dp[i - 1][j - 1] / (m - 1);
      else
        dp[i][j] = dp[i][j - 1] +
                   (dp[i - 1][j - 1] - dp[i - 1][j - xs[i]] +
                    (dp[i - 1][j - xs[i] - 1] - dp[i - 1][max(0, j - m - 1)])) /
                       (m - 1);
    }
  }
  cout.precision(10);
  cout << fixed << 1.0 + dp[n][score - 1] << endl;
  return 0;
}
