#include <bits/stdc++.h>
using namespace std;
int i, n, m, j, a[109];
double sum, sump, ans;
double p[109][100009], pre[100009];
int main() {
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i <= m; i++) p[1][i] = (double)1 / (m - 1);
  p[1][a[1]] = 0;
  for (i = 2; i <= n; i++) {
    for (j = 1; j <= i * m; j++) pre[j] = pre[j - 1] + p[i - 1][j];
    for (j = i; j <= i * m; j++) {
      p[i][j] = j - m - 1 >= 0 ? pre[j - 1] - pre[j - m - 1] : pre[j - 1];
      p[i][j] -= j - a[i] > 0 ? p[i - 1][j - a[i]] : 0;
      p[i][j] /= m - 1;
    }
  }
  sum = 0;
  for (i = 1; i <= n; i++) sum += a[i];
  sump = 0;
  for (i = n; i < sum; i++) sump += p[n][i];
  ans = sump * (m - 1);
  printf("%.16lf\n", ans + 1);
  return 0;
}
