#include <bits/stdc++.h>
using namespace std;
double f[101][100001];
int n, m;
int a[10001];
int Sum = 0;
double sum[1000001];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), Sum += a[i];
  f[0][0] = m - 1;
  for (int j = 0; j <= m; j++) sum[j] = 1.0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= (i + 1) * m; j++) {
      f[i + 1][j] += sum[min(j - 1, i * m)];
      if (j >= m + 1) f[i + 1][j] -= sum[j - m - 1];
      if (j >= a[i + 1]) f[i + 1][j] -= f[i][j - a[i + 1]] / (m - 1);
    }
    for (int j = 0; j <= i; j++) sum[j] = 0.0;
    for (int j = i + 1; j <= (i + 1) * m; j++)
      sum[j] = sum[j - 1] + f[i + 1][j] / (m - 1);
  }
  double ans = 0.0;
  for (int i = 0; i < Sum; i++) ans += f[n][i];
  printf("%.9f\n", ans + 1.0);
  return 0;
}
