#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chkmin(T& x, T y) {
  return x > y ? x = y, true : false;
}
template <class T>
inline bool chkmax(T& x, T y) {
  return x < y ? x = y, true : false;
}
inline long long read(void) {
  long long x, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (x = 0; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
double f[2][100005], s[100005];
int n, m, pp, rk[105], p, g;
double ans;
int main(void) {
  n = read();
  m = read();
  f[0][0] = m - 1;
  if (m == 1) {
    puts("1");
    return 0;
  }
  for (int i = 1; i <= n; ++i) rk[i] = read(), pp += rk[i];
  p = 0;
  g = 1;
  for (int i = 1; i <= n; ++i) {
    s[0] = f[p][0];
    for (int j = 1; j <= n * m; ++j) s[j] = s[j - 1] + f[p][j];
    for (int j = 1; j <= n * m; ++j) {
      f[g][j] = s[j - 1] / (m - 1);
      if (j > m) f[g][j] -= s[j - m - 1] / (m - 1);
      if (j >= rk[i]) f[g][j] -= f[p][j - rk[i]] / (m - 1);
    }
    memset(f[p], 0, sizeof(f[p]));
    swap(p, g);
  }
  for (int i = 1; i <= pp - 1; ++i) ans += f[p][i];
  printf("%.10f\n", 1 + ans);
  return 0;
}
