#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long double dp[100][100000 + 1];
int main() {
  int n, m, s1 = 0;
  cin >> n >> m;
  vector<int> r(n);
  for (int i = 0; i < (n); ++i) {
    cin >> r[i];
    s1 += r[i];
  }
  int S = n * m;
  if (m == 1) {
    cout << 1 << "\n";
    return 0;
  }
  long double p = 1.0 / (m - 1);
  for (int i = 0; i <= S; ++i) {
    if (i >= 1 && i <= m && i != r[0]) {
      dp[0][i] = p;
    }
    if (i > 0) dp[0][i] += dp[0][i - 1];
  }
  for (int i = 1; i < n; ++i) {
    for (int j = 1; j <= S; ++j) {
      dp[i][j] += dp[i - 1][j - 1];
      if (j - 1 - m >= 0) dp[i][j] -= dp[i - 1][j - 1 - m];
      dp[i][j] *= p;
    }
    for (int j = 0; j <= S; ++j) {
      if (j + r[i] <= S) {
        dp[i][j + r[i]] -= p * (dp[i - 1][j] - (j > 0 ? dp[i - 1][j - 1] : 0));
      } else
        break;
    }
    for (int j = 1; j <= S; ++j) {
      dp[i][j] += dp[i][j - 1];
    }
  }
  p = dp[n - 1][s1 - 1] * (m - 1) + 1;
  printf("%.15lf\n", (double)p);
  return 0;
}
