#include <bits/stdc++.h>
using namespace std;
int N, M, R;
double dp[101 * 1010];
int x[101];
double S[101 * 1010];
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; i++) {
    scanf("%d", &x[i]);
    R += x[i];
  }
  dp[0] = M - 1;
  for (int i = 0; i < M; i++) {
    S[i] = M - 1;
  }
  for (int i = 0; i < N; i++) {
    int l = i, r = (i + 1) * M;
    for (int j = r - x[i]; j >= l; j--) {
      dp[j + x[i]] = (S[j + x[i] - 1] - dp[j]) / (M - 1);
    }
    for (int j = l + x[i] - 1; j > l; j--) {
      dp[j] = S[j - 1] / (M - 1);
    }
    for (int i = 0; i < l + 1; i++) {
      dp[i] = 0.;
    }
    double t = 0.;
    for (int i = 0; i < M; i++) {
      t += dp[i];
      S[i] = t;
    }
    for (int i = M; i < r + M + 1; i++) {
      S[i] = S[i - 1] + dp[i] - dp[i - M];
    }
  }
  double res = 0.;
  for (int i = 0; i < R; i++) {
    res += dp[i];
  }
  printf("%.16f\n", res + 1.);
  return 0;
}
