#include <bits/stdc++.h>
using namespace std;
double f[2][500000];
int n, sum, m, a;
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) return puts("1"), 0;
  f[0][0] = m - 1;
  for (int i = 0; i <= n - 1; i++) {
    scanf("%d", &a);
    for (int j = 0; j <= n * m; j++) f[i & 1 ^ 1][j] = 0;
    for (int j = 0; j <= i * m; j++) {
      double p = f[i & 1][j] / (m - 1);
      f[i & 1 ^ 1][j + 1] += p;
      f[i & 1 ^ 1][j + m + 1] -= p;
      f[i & 1 ^ 1][j + a] -= p;
      f[i & 1 ^ 1][j + a + 1] += p;
    }
    for (int j = 1; j <= (i + 1) * m; j++)
      f[i & 1 ^ 1][j] += f[i & 1 ^ 1][j - 1];
    sum += a;
  }
  double ans = 0;
  for (int i = 0; i <= sum - 1; i++) ans += f[n & 1][i];
  printf("%.15lf\n", ans + 1);
}
