#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long INF_LL = 4e18;
const double pi = acos(-1.0);
template <class T>
T& smin(T& a, const T& b) {
  if (a > b) a = b;
  return a;
}
template <class T>
T& smax(T& a, const T& b) {
  if (a < b) a = b;
  return a;
}
template <class T>
T sqr(const T& a) {
  return a * a;
}
template <typename Iterator>
void print(const char* fmt, Iterator begin, Iterator end,
           const char* delimiter = " ", const char* closing = "\n") {
  for (; begin != end; ++begin != end ? printf("%s", delimiter) : 0)
    printf(fmt, *begin);
  printf("%s", closing);
}
const int N = 101, M = 1001;
int n, m, x[N];
double p[N][N * M];
int main() {
  cin.tie(NULL);
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("1\n");
    return 0;
  }
  for (int i(0), _b(n); i < _b; ++i) scanf("%d", x + i);
  p[0][0] = 1;
  for (int i(0), _b(n); i < _b; ++i) {
    double s = 0;
    for (int j(1), _b((i + 1) * m + 1); j < _b; ++j) {
      s += p[i][j - 1];
      if (j > m) s -= p[i][j - m - 1];
      if (j > x[i]) s += p[i][j - x[i] - 1];
      if (j >= x[i]) s -= p[i][j - x[i]];
      p[i + 1][j] = s / (m - 1);
    }
  }
  int sx = 0;
  for (int i(0), _b(n); i < _b; ++i) sx += x[i];
  double ans = 0;
  for (int j(0), _b(sx); j < _b; ++j) ans += p[n][j];
  printf("%.12lf\n", 1 + ans * (m - 1));
  return 0;
}
