#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105, MAXM = 1005;
double f[MAXN][MAXN * MAXM], sum[MAXN * MAXM];
int n, m, a[MAXN], src;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), src += a[i];
  if (m == 1) return printf("1\n"), 0;
  f[0][0] = 1;
  double p = 1.0 / (m - 1);
  for (int i = 0; i < n; i++) {
    int lim = (i + 1) * m;
    sum[0] = f[i][0];
    for (int j = 1; j <= lim; j++) {
      sum[j] = sum[j - 1] + f[i][j];
      double t = sum[j - 1];
      if (j > m) t -= sum[j - m - 1];
      if (j >= a[i + 1]) t -= f[i][j - a[i + 1]];
      f[i + 1][j] = t * p;
    }
  }
  double rk = 0;
  for (int i = 1; i < src; i++) rk += f[n][i] * (m - 1);
  printf("%.10lf", rk + 1.0);
}
