#include <bits/stdc++.h>
using namespace std;
double dp[102][102 * 1003 + 1003];
double acc[102][102 * 1003 + 1003];
int score[102], N, M, tscore;
int main() {
  scanf("%d %d", &N, &M);
  if (M == 1) {
    printf("%.15lf\n", 1.);
    return 0;
  }
  for (int i = 0; i < N; i++) {
    scanf("%d", &score[i]);
    tscore += score[i];
  }
  for (int accs = 0; accs < tscore; accs++) {
    dp[N][accs] = 1;
  }
  acc[N][0] = dp[N][0];
  for (int i = 1; i < N * M + M; i++) acc[N][i] = dp[N][i] + acc[N][i - 1];
  for (int n = N - 1; n > -1; n--) {
    for (int accs = N * M + M - 1; accs > -1; accs--) {
      dp[n][accs] = 0;
      if (accs < tscore) {
        dp[n][accs] = (acc[n + 1][accs + M] - acc[n + 1][accs] -
                       dp[n + 1][accs + score[n]]) /
                      (M - 1);
      }
    }
    acc[n][0] = dp[n][0];
    for (int i = 1; i < N * M + M; i++) acc[n][i] = dp[n][i] + acc[n][i - 1];
  }
  printf("%.15lf\n", dp[0][0] * (M - 1) + 1);
}
