#include <bits/stdc++.h>
using namespace std;
int a[105];
double sum[2][100005];
int main() {
  int n, m, i, k, j, t = 0, cur = 1;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]), t += a[i];
  for (i = 0; i <= t; i++) sum[cur][i] = 1;
  if (m == 1) {
    puts("1.0000000000000000");
    return 0;
  }
  for (i = 1; i <= n; i++) {
    cur ^= 1;
    memset(sum[cur], 0, sizeof(sum[cur]));
    for (k = 1; k <= t; k++) {
      double x = sum[cur ^ 1][k - 1];
      if (k - m - 1 >= 0) x -= sum[cur ^ 1][k - m - 1];
      if (k > a[i]) x -= sum[cur ^ 1][k - a[i]] - sum[cur ^ 1][k - a[i] - 1];
      if (k == a[i]) x -= sum[cur ^ 1][0];
      x /= m - 1;
      sum[cur][k] = x + sum[cur][k - 1];
    }
  }
  double ans = sum[cur][t - 1];
  printf("%.15lf", ans * (m - 1) + 1.0);
  return 0;
}
