#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
double dp[2][maxn];
int n, m;
void solve() {
  if (m == 1) {
    puts("1.000000");
    return;
  }
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  int now = 1, last = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    sum += x;
    for (int j = 0; j <= n * m; j++) {
      double t = dp[last][j] / (m - 1);
      if (j + 1 <= n * m) dp[now][j + 1] += t;
      if (j + x <= n * m) dp[now][j + x] -= t;
      if (j + x + 1 <= n * m) dp[now][j + x + 1] += t;
      if (j + m + 1 <= n * m) dp[now][j + m + 1] -= t;
    }
    for (int j = 1; j <= n * m; j++) dp[now][j] += dp[now][j - 1];
    memset(dp[last], 0, sizeof(dp[last]));
    swap(now, last);
  }
  double ans = 0;
  for (int i = 0; i < sum; i++) ans += dp[last][i] * (m - 1);
  printf("%.10f\n", ans + 1);
}
int main() {
  scanf("%d%d", &n, &m);
  solve();
  return 0;
}
