#include <bits/stdc++.h>
using namespace std;
int inp[105];
double dp[100005][105];
double dp2[100005][105];
int main() {
  int n, m;
  cin >> n >> m;
  if (m == 1) {
    cout << 1 << endl;
    return 0;
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &inp[i + 1]);
    sum += inp[i + 1];
  }
  memset(dp, 0, sizeof dp);
  memset(dp2, 0, sizeof dp2);
  for (int i = 1; i <= m; i++) dp[i][1] = 1.0 / (m - 1);
  dp[inp[1]][1] = 0;
  for (int i = 1; i <= (n * m); i++) {
    dp2[i][1] = dp2[i - 1][1] + dp[i][1];
    if ((i - m) >= 0) dp2[i][1] -= dp[i - m][1];
  }
  for (int game = 2; game <= n; game++) {
    for (int score = 1; score <= (n * m); score++) {
      dp[score][game] = dp2[score - 1][game - 1] * (1.0 / (m - 1));
      if (score - inp[game] >= 0)
        dp[score][game] =
            dp[score][game] - dp[score - inp[game]][game - 1] * (1.0 / (m - 1));
    }
    for (int score = 1; score <= (n * m); score++) {
      dp2[score][game] = dp2[score - 1][game] + dp[score][game];
      if ((score - m) >= 0) dp2[score][game] -= dp[score - m][game];
    }
  }
  double pless = 0;
  for (int score = 1; score <= sum - 1; score++) pless += dp[score][n];
  printf("%.15lf\n", 1 + (m - 1) * pless);
  return 0;
}
