#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int N = 105;
const int M = 1005;
double f[2][N * M], s[N * M];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m == 1) {
    puts("1");
    return 0;
  }
  f[0][0] = m - 1;
  for (int i = 0; i <= n * m; ++i) s[i] = m - 1;
  int sum = 0;
  for (int x, k = 1, cur = 1; k <= n; cur ^= 1, ++k) {
    scanf("%d", &x);
    sum += x;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int i = 1; i <= n * m; ++i) {
      int j = min(i, m);
      f[cur][i] += (s[i - 1] - s[i - j - 1]);
      if (i >= x) f[cur][i] -= (f[cur ^ 1][i - x]);
      f[cur][i] /= m - 1;
    }
    memset(s, 0, sizeof(s));
    s[1] = f[cur][1];
    for (int i = 2; i <= n * m; ++i) s[i] = s[i - 1] + f[cur][i];
  }
  double ans = 1;
  printf("%.14lf\n", s[sum - 1] + 1);
  return 0;
}
