#include <bits/stdc++.h>
using namespace std;
const int oo = 2000000000;
const int maxn = 105;
const int maxm = 1005;
int n, m, Limit, Sum;
int A[maxn];
double F[maxn * maxm], G[maxn * maxm];
inline int read() {
  int x = 0;
  bool flag = false;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') flag = true;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return flag ? -x : x;
}
int main() {
  n = read(), m = read();
  Limit = n * m;
  if (m == 1) {
    double AA = 1.0;
    printf("%.15lf\n", AA);
    return 0;
  }
  for (int i = 1; i <= n; i++) A[i] = read();
  F[0] = 1;
  for (int i = 1; i <= n; i++) {
    Sum += A[i], G[0] = F[0];
    for (int j = 1; j <= Limit; j++) G[j] = G[j - 1] + F[j];
    for (int j = Limit; j >= 1; j--) {
      double Cnt = 0;
      if (j - m - 1 < 0)
        Cnt = G[j - 1];
      else
        Cnt = G[j - 1] - G[j - m - 1];
      if (j - A[i] >= 0) Cnt -= F[j - A[i]];
      F[j] = Cnt / (m - 1);
    }
    F[0] = 0;
  }
  double Ans = 0;
  for (int i = 1; i < Sum; i++) Ans += F[i];
  Ans *= (m - 1);
  printf("%.15lf\n", Ans + 1);
  return 0;
}
