#include <bits/stdc++.h>
using namespace std;
double dp[105][100005];
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  vector<int> my_scores(N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &my_scores[i]);
  }
  int max_score = N * M + 5;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < max_score; j++) dp[i][j] = 0;
  }
  for (int j = 1; j <= M; j++) {
    if (j != my_scores[0])
      dp[0][j] = dp[0][j - 1] + 1.0;
    else
      dp[0][j] = dp[0][j - 1];
  }
  for (int i = 1; i < N; i++) {
    for (int j = i + 1; j <= M * (i + 1); j++) {
      int L = max(j - M, i);
      int H = min(j - 1, i * M);
      double val = dp[i - 1][H] - dp[i - 1][L - 1];
      int vis = j - my_scores[i];
      if (vis >= L && vis <= H) val -= (dp[i - 1][vis] - dp[i - 1][vis - 1]);
      val *= (1.0 / (double)(M - 1));
      dp[i][j] = val + dp[i][j - 1];
    }
  }
  int my_total_score = 0;
  for (int i = 0; i < N; i++) {
    my_total_score += my_scores[i];
  }
  double people_ahead = dp[N - 1][my_total_score - 1];
  double rank = people_ahead + 1.0;
  printf("%0.16lf\n", rank);
  return 0;
}
