#include <bits/stdc++.h>
using namespace std;
int n, m, s[1010], sk = 0;
double f[110][100010], g[110][100010], ans = 0;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &s[i]);
    sk += s[i];
  }
  f[0][0] = m - 1;
  for (int i = 0; i <= n; i++) f[i][0] = 0;
  for (int i = 1; i <= n * m; i++) {
    if (i != s[1] && i <= m) f[1][i] = 1;
    g[1][i] = g[1][i - 1] + f[1][i];
  }
  for (int i = 2; i <= n; i++) {
    for (int j = i; j <= i * m; j++) {
      f[i][j] = (g[i - 1][j - 1] - g[i - 1][max(j - m - 1, 0)] -
                 f[i - 1][max(j - s[i], 0)]) /
                ((double)(m - 1));
    }
    for (int j = 1; j <= n * m; j++) {
      g[i][j] = g[i][j - 1] + f[i][j];
    }
  }
  printf("%.10lf\n", g[n][sk - 1] + 1);
  return 0;
}
