#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100009;
int n, m, s, p, q, mm;
double f[2][MAXN];
double Solve() {
  if (m == 1) return 0;
  memset(f, 0, sizeof(f));
  s = 0, p = 0, q = 1;
  f[p][0] = 1;
  mm = 0;
  while (n--) {
    int x;
    scanf("%d", &x);
    s += x;
    swap(p, q);
    memset(f[p], 0, sizeof(f[p]));
    for (int j = 0; j < mm + 1; ++j) f[q][j] /= (m - 1);
    for (int j = 0; j < mm + 1; ++j)
      f[p][j + 1] += f[q][j], f[p][j + m + 1] -= f[q][j];
    mm += m;
    for (int j = 1; j < mm + 1; ++j) f[p][j] += f[p][j - 1];
    for (int j = 0; j < mm - m + 1; ++j) f[p][j + x] -= f[q][j];
  }
  double z = 0;
  for (int j = 0; j < s; ++j) z += f[p][j] * (m - 1);
  return z;
}
int main() {
  scanf("%d%d", &n, &m);
  printf("%.12lf\n", 1 + Solve());
}
