#include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int M = 1100;
double f[N][N * M];
double sum[N * M];
int a[N];
int main() {
  int n, m, Maxscore = 0;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    Maxscore += a[i];
  }
  f[0][0] = m - 1;
  for (int i = 0; i <= m; i++) sum[i] = 1.0;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= i * m; j++) {
      f[i][j] += sum[min(j - 1, (i - 1) * m)];
      if (j >= m + 1) f[i][j] -= sum[j - m - 1];
      if (j >= a[i]) f[i][j] -= f[i - 1][j - a[i]] / (m - 1);
    }
    for (int j = 0; j < i; j++) sum[j] = 0.0;
    for (int j = i; j <= i * m; j++) sum[j] = sum[j - 1] + f[i][j] / (m - 1);
  }
  double ans = 0.0;
  for (int i = 0; i < Maxscore; i++) ans += f[n][i];
  printf("%.12lf\n", ans + 1.0);
  return 0;
}
