#include <bits/stdc++.h>
using namespace std;
const int maxn = 101;
const int maxm = 1010;
int n, m, s, a[maxn];
double dp[maxn * maxm], dpp[maxn * maxm];
int main() {
  scanf("%d%d", &n, &m);
  s = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  if (m == 1) {
    puts("1");
    return 0;
  }
  memset(dp, 0, sizeof(dp));
  dp[0] = m - 1;
  for (int i = 1; i <= n; i++) {
    memset(dpp, 0, sizeof(dpp));
    for (int j = 0; j <= n * m; j++) {
      double p = dp[j] / (m - 1);
      dpp[j + 1] += p;
      dpp[j + m + 1] -= p;
      dpp[j + a[i]] -= p;
      dpp[j + a[i] + 1] += p;
    }
    dp[0] = dpp[0];
    for (int j = 1; j <= n * m; j++) dpp[j] += dpp[j - 1], dp[j] = dpp[j];
  }
  double ans = 0;
  for (int j = 0; j < s; j++) ans += dp[j];
  printf("%.12lf\n", ans + 1.0);
  return 0;
}
