#include <bits/stdc++.h>
using namespace std;
int E[102];
const int MAXS = 120005;
double DP[2][MAXS], SP[MAXS];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (n); ++i) scanf("%d", &E[i]);
  for (int i = 0; i < (n); ++i) E[i]--;
  DP[0][0] = 1.;
  int ii = 0, i1 = 1;
  for (int i = 0; i < (n + 1); ++i) {
    for (int j = 0; j < ((i + 1) * m); ++j)
      SP[j] = DP[ii][j] + (j ? SP[j - 1] : 0);
    for (int j = 0; j < ((i + 1) * m); ++j) {
      double e = SP[j];
      if (j >= m) e -= SP[j - m];
      if (j >= E[i]) e -= DP[ii][j - E[i]];
      DP[i1][j] = e / (m - 1);
    }
    swap(ii, i1);
  }
  int sum = 0;
  for (int i = 0; i < (n); ++i) sum += E[i];
  double s = 0;
  for (int j = 0; j < (sum); ++j) s += DP[n % 2][j];
  printf("%.9lf\n", 1 + (m - 1) * s);
  return 0;
}
