#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
const int maxm = 1000 + 10;
double d[2][maxm * maxn];
double s[2][maxm * maxn];
int x[maxn];
int main() {
  int n, m, sum = 0;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", x + i);
    sum += x[i];
  }
  for (int i = 1; i <= m; i++)
    if (i != x[1]) d[1][i] = 1;
  int cur = 1, pre;
  for (int i = 2; i <= n; i++) {
    cur ^= 1;
    pre = cur ^ 1;
    memset(s[pre], 0, sizeof(s[pre]));
    memset(d[cur], 0, sizeof(d[cur]));
    s[pre][i - 1] = d[pre][i - 1];
    for (int j = i; j <= i * m; j++) s[pre][j] = s[pre][j - 1] + d[pre][j];
    for (int j = i; j <= i * m; j++) {
      int l = max(1, j - m);
      int r = j - 1;
      d[cur][j] = s[pre][r] - s[pre][l - 1];
      if (j - x[i] >= 0) d[cur][j] -= d[pre][j - x[i]];
      d[cur][j] /= (m - 1);
    }
  }
  double ans = 0;
  for (int i = n; i < sum; i++) ans += d[cur][i];
  ans += 1.0;
  printf("%.16f\n", ans);
  return 0;
}
