#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 50;
int n, m, x[maxn], enf;
double dp[101][100005];
int main(int argc, char *argv[]) {
  scanf("%d%d", &n, &m);
  enf = n * m;
  int rank = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", x + i);
    rank += x[i];
  }
  memset(dp, 0, sizeof(dp));
  dp[0][0] = m - 1;
  double px = 0;
  int sumup = 0;
  if (m > 1) px = 1.0 / (double)(m - 1);
  for (int i = 1; i <= n; ++i) {
    double sum = 0;
    sumup += m;
    for (int j = 0; j <= sumup; ++j) {
      if (j - m - 1 >= 0) sum -= dp[i - 1][j - m - 1];
      if (j - x[i] < 0)
        dp[i][j] = sum * px;
      else
        dp[i][j] = (sum - dp[i - 1][j - x[i]]) * px;
      sum += dp[i - 1][j];
    }
  }
  double ans = 1;
  for (int i = 0; i < rank; ++i) ans += dp[n][i];
  printf("%.10lf\n", ans);
  return 0;
}
