#include <bits/stdc++.h>
using namespace std;
int n, m;
const int N = 101, M = 1001;
int a[M];
double E[N][M * N + 1];
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("1\n");
    return 0;
  }
  int me = 0;
  for (int i = 0; i < (int)n; i++) scanf("%d", &a[i]), me += a[i];
  for (int i = 1; i < (int)m + 1; i++)
    if (i != a[0]) E[0][i] = 1;
  for (int i = 1; i < (int)n; i++) {
    for (int j = 1; j < (int)M * N + 1; j++) E[i - 1][j] += E[i - 1][j - 1];
    for (int j = 1; j < (int)M * N + 1; j++) {
      E[i][j] =
          j - a[i] - 1 >= 0
              ? max(0.0, E[i - 1][j - a[i] - 1] - E[i - 1][max(0, j - m - 1)])
              : 0;
      E[i][j] += max(0.0, E[i - 1][j - 1] - E[i - 1][max(0, j - a[i])]);
      E[i][j] /= m - 1;
    }
  }
  double r = 0;
  for (int i = 1; i < (int)me; i++) r += E[n - 1][i];
  printf("%.11f\n", r + 1.0);
  return 0;
}
