#include <bits/stdc++.h>
using namespace std;
double dp[105][100010];
double sum[105][100010];
int main() {
  int n, m, x;
  scanf("%d%d", &n, &m);
  dp[0][0] = sum[0][0] = m - 1;
  int tot = n * m;
  int p = 0;
  for (int i = 1; i <= tot; i++) sum[0][i] = sum[0][i - 1] + dp[0][i];
  double q = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    p += x;
    q = q * (m - 1);
    for (int j = 1; j <= tot; j++) {
      if (j >= m)
        dp[i][j] +=
            (sum[i - 1][j - 1] - sum[i - 1][j - m - 1] - dp[i - 1][j - x]);
      else if (j >= x)
        dp[i][j] += (sum[i - 1][j - 1] - dp[i - 1][j - x]);
      else
        dp[i][j] += sum[i - 1][j - 1];
      sum[i][j] = sum[i][j - 1] + dp[i][j];
    }
  }
  if (m == 1) {
    printf("1\n");
    return 0;
  }
  double ans = 1 + sum[n][p - 1] / q;
  printf("%.12lf\n", ans);
  return 0;
}
