#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int maxn = 105;
const int maxm = 1005;
const int maxs = maxn * maxm;
int n, m;
double dp[2][maxs];
int x[maxn];
int main() {
  cin >> n >> m;
  if (m == 1) {
    puts("1");
    return 0;
  }
  bool f = 0;
  int tol = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
    tol += x[i];
  }
  dp[0][0] = m - 1;
  for (int i = 1; i <= n; i++) {
    f ^= 1;
    double now = 0;
    for (int j = 1; j <= tol; j++) {
      now += dp[f ^ 1][j - 1];
      if (j > m) now -= dp[f ^ 1][j - m - 1];
      if (j >= x[i]) now -= dp[f ^ 1][j - x[i]];
      dp[f][j] = now / (m - 1);
      if (j >= x[i]) now += dp[f ^ 1][j - x[i]];
    }
    dp[f ^ 1][0] = 0;
  }
  double ans = 0;
  for (int i = 1; i < tol; i++) ans += dp[f][i];
  printf("%.20f\n", ans + 1);
  return 0;
}
