#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int res = 0;
  int neg;
  while (true) {
    char ch = getchar();
    if (ch >= '0' && ch <= '9' || ch == '-') {
      if (ch == '-')
        neg = -1;
      else
        neg = 1, res = ch - '0';
      break;
    }
  }
  while (true) {
    char ch = getchar();
    if (ch >= '0' && ch <= '9')
      res *= 10, res += ch - '0';
    else
      break;
  }
  return res * neg;
}
const int maxn = 100020;
const int maxm = 1000020;
const int MOd = 1e9 + 7;
const int P = 37;
int a, b, ar[maxn];
double dn[105][101020];
double top[105][101020];
int main() {
  scanf("%d %d", &a, &b);
  int tp = 0;
  for (int i = 1; i <= a; i++) scanf("%d", &ar[i]), tp += ar[i];
  for (int i = tp - 1; i >= 0; i--) {
    dn[a + 1][i] = 1;
    top[a + 1][i] = dn[a + 1][i + 1] + top[a + 1][i + 1] - dn[a + 1][i + b + 1];
  }
  for (int i = a; i >= 1; i--)
    for (int j = a * b; j >= 0; j--) {
      double val = (double)(top[i + 1][j] - dn[i + 1][j + ar[i]]) / (b - 1);
      if (b == 1) val = 0;
      dn[i][j] = val;
      top[i][j] = dn[i][j + 1] + top[i][j + 1] - dn[i][j + b + 1];
    }
  double t = dn[1][0];
  printf("%.12lf\n", (double)1 + (double)t * (b - 1));
  return 0;
}
