#include <bits/stdc++.h>
using namespace std;
int n, m, s, a[101];
double dp[111111], dpp[111111];
int main() {
  while (~scanf("%d%d", &n, &m)) {
    s = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), s += a[i];
    if (m == 1) {
      printf("1\n");
      continue;
    }
    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("%.12f\n", ans + 1.0);
  }
  return 0;
}
