#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 1e6 + 10;
double f[2][N];
int n, m;
int main() {
  cin >> n >> m;
  if (m == 1) {
    printf("1.0000000000000");
    return 0;
  }
  f[0][0] = 1;
  int asum = 0, x;
  for (auto i = 1; i <= n; i++) {
    scanf("%d", &x);
    asum += x;
    int cur = i & 1, last = cur ^ 1;
    double sum = 0;
    for (auto j = 0; j <= m * i; j++) {
      if (j) sum = sum + f[last][j - 1];
      f[cur][j] = (sum - ((j >= x) ? f[last][j - x] : 0)) / (m - 1);
      if (j >= m) sum -= f[last][j - m];
    }
  }
  double ans = 0;
  for (auto i = 0; i < asum; i++) ans += (m - 1) * f[n & 1][i];
  printf("%.12f", ans + 1);
}
