#include <bits/stdc++.h>
using namespace std;
const int N = 105;
const int M = 1005;
int n, m, x, s;
double f[2][N * M], g[2][N * M];
int main() {
  scanf("%d%d", &n, &m);
  int cur = 0;
  f[cur][0] = m - 1;
  for (int i = 1; i < n * m; i++) g[cur][i] = m - 1;
  if (m == 1) {
    puts("1");
    return 0;
  }
  for (int k = 0; k < n; k++) {
    scanf("%d", &x);
    s += x;
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    memset(g[cur], 0, sizeof(g[cur]));
    for (int i = 1; i < n * m; i++) {
      f[cur][i] = g[cur ^ 1][i] - g[cur ^ 1][i - min(i, m)];
      if (i >= x) f[cur][i] -= f[cur ^ 1][i - x];
      f[cur][i] /= m - 1;
      g[cur][i + 1] = g[cur][i] + f[cur][i];
    }
  }
  printf("%.12lf\n", g[cur][s] + 1);
  return 0;
}
