#include <bits/stdc++.h>
const int N = 105, M = 1005;
int data[N];
double dp[2][N * M];
int main() {
  int i, j, cur, n, m, tot;
  while (~scanf("%d%d", &n, &m)) {
    tot = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &data[i]);
      tot += data[i];
    }
    memset(dp[0], 0, sizeof(dp[0]));
    dp[0][0] = m - 1;
    cur = 0;
    for (i = 1; i <= n; i++) {
      double sum = 0;
      cur ^= 1;
      memset(dp[cur], 0, sizeof(dp[cur]));
      for (j = i; j <= m * i; j++) {
        sum += dp[cur ^ 1][j - 1];
        if (j >= m + 1) sum -= dp[cur ^ 1][j - m - 1];
        dp[cur][j] = sum / (m - 1);
        if (j >= data[i]) dp[cur][j] -= dp[cur ^ 1][j - data[i]] / (m - 1);
      }
    }
    double ans = 1;
    for (i = 0; i < tot; i++) ans += dp[cur][i];
    printf("%.10lf\n", ans);
  }
  return 0;
}
