#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
double dp[2][maxn], presum[maxn];
int x[maxn];
int n, m, mxs;
int main() {
  scanf("%d%d", &n, &m);
  mxs = n * m;
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  int p = 0, q = 1;
  dp[p][0] = 1.0 * (m - 1);
  for (int i = 1; i <= n; i++) {
    presum[0] = dp[p][0];
    for (int j = 1; j <= mxs; j++) {
      presum[j] = presum[j - 1] + dp[p][j];
    }
    for (int j = 0; j <= mxs; j++) {
      dp[q][j] = (j ? presum[j - 1] : 0) / (m - 1);
      if (j - m - 1 >= 0) dp[q][j] -= presum[j - m - 1] / (m - 1);
      if (j >= x[i]) {
        dp[q][j] -= dp[p][j - x[i]] / (m - 1);
      }
    }
    swap(p, q);
  }
  double ans = 0;
  int mrk = 0;
  for (int i = 1; i <= n; i++) mrk += x[i];
  for (int i = n; i < mrk; i++) {
    ans += dp[p][i];
  }
  printf("%.10lf\n", ans + 1.0);
  return 0;
}
