#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 5;
const int M = 1e3 + 5;
const int mod = 1e9 + 7;
int n, m, a[N], now, tot;
double dp[2][N * M], sum[N * M], kk, ans = 1;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return x * f;
}
int main() {
  n = read(), m = read();
  if (m == 1) return puts("1"), 0;
  kk = 1.0 / (m - 1);
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= m; i++)
    if (i != a[1]) dp[now][i] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= i * m; j++) sum[j] = sum[j - 1] + dp[now][j];
    now ^= 1;
    for (int j = 1; j <= i * m; j++) {
      dp[now][j] = sum[j - 1];
      if (j > m) dp[now][j] -= sum[j - m - 1];
      if (j > a[i]) dp[now][j] -= dp[now ^ 1][j - a[i]];
      dp[now][j] *= kk;
    }
  }
  for (int i = 1; i <= n; i++) tot += a[i];
  for (int i = 1; i < tot; i++) ans += dp[now][i];
  printf("%0.10lf\n", ans);
  return 0;
}
