#include <bits/stdc++.h>
using namespace std;
const int N = 105;
const int M = 1005;
double f[2][N * M], s[N * M];
int a[N];
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) + 1) {
    int tol(0);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), tol += a[i];
    if (m == 1) {
      printf("%.12f\n", 1.0);
      continue;
    }
    int now(0);
    f[now][0] = s[0] = m - 1;
    for (int i = 1; i <= n * m; i++)
      f[now][i] = 0.0, s[i] = s[i - 1] + f[now][i];
    for (int i = 1; i <= n; i++) {
      int nxt = now ^ 1;
      f[nxt][0] = 0.0;
      for (int j = 1; j <= n * m; j++) {
        double c(s[j - 1]);
        if (j - m - 1 >= 0) c -= s[j - m - 1];
        if (j - a[i] >= 0) c -= f[now][j - a[i]];
        f[nxt][j] = c / (double)(m - 1);
      }
      now = nxt;
      s[0] = 0.0;
      for (int j = 1; j <= n * m; j++) s[j] = s[j - 1] + f[now][j];
    }
    double ans(s[tol - 1]);
    printf("%.12f\n", ans + 1.0);
  }
  return 0;
}
