#include <bits/stdc++.h>
using namespace std;
double dp[100 * 1001][2];
int N, M, s[100];
int main() {
  cout << fixed << setprecision(16);
  while (scanf("%d %d", &N, &M) != EOF) {
    for (int i = int(0); i < int(N * M + 1); i++) dp[i][0] = dp[i][1] = 0.0;
    dp[0][0] = 1;
    int sum = 0;
    for (int i = int(0); i < int(N); i++) {
      scanf("%d", s + i);
      sum += s[i];
    }
    for (int i = int(0); i < int(N); i++) {
      int cur = i & 1;
      int next = !cur;
      double tempSum = 0.0;
      for (int j = int(0); j < int(M); j++) {
        if (s[i] == j) continue;
        tempSum += dp[N * M - j][cur];
      }
      for (int j = N * M; j >= 0; j--) {
        dp[j][next] = 0.;
        double div = M - 1;
        if (!div || i == N - 1) div = 1.0;
        tempSum -= dp[j][cur];
        if (j - M >= 0) tempSum += dp[j - M][cur];
        if (j - s[i] >= 0) tempSum -= dp[j - s[i]][cur];
        if (j - s[i] + 1 >= 0) tempSum += dp[j - s[i] + 1][cur];
        dp[j][next] = tempSum / div;
      }
    }
    double ans = 1.;
    for (int i = int(0); i < int(sum); i++) {
      if (i < sum) ans += dp[i][N & 1];
    }
    printf("%.16f\n", ans);
  }
  return 0;
}
