#include <bits/stdc++.h>
using namespace std;
int n, m, a[105], tot;
double dp[2][100005], sum[2][100005];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i], tot += a[i];
  dp[0][0] = m - 1;
  for (int j = 0; j <= n * m; j++) sum[0][j] = m - 1;
  for (int i = 1; i <= n; i++) {
    memset(dp[i % 2], 0, sizeof(dp[i % 2]));
    memset(sum[i % 2], 0, sizeof(sum[i % 2]));
    for (int j = i; j <= i * m; j++) {
      int r = j - 1;
      int l = max(0, j - m);
      if (l == 0)
        dp[i % 2][j] = sum[(i - 1) % 2][r];
      else
        dp[i % 2][j] = sum[(i - 1) % 2][r] - sum[(i - 1) % 2][l - 1];
      if (l <= j - a[i] && j - a[i] <= r)
        dp[i % 2][j] -= dp[(i - 1) % 2][j - a[i]];
      dp[i % 2][j] /= m - 1;
    }
    for (int j = i; j <= i * m + m; j++)
      sum[i % 2][j] = sum[i % 2][j - 1] + dp[i % 2][j];
  }
  double ans = 0;
  for (int i = 0; i < tot; i++) ans += dp[n % 2][i];
  printf("%.12lf\n", ans + 1);
  return 0;
}
