#include <bits/stdc++.h>
using namespace std;
double gl[2][111010];
int a[201];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j <= n * m + 2 * m; j++) gl[i][j] = 0;
  }
  int S = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    S += a[i];
  }
  if (m == 1) {
    printf("1.000000000\n");
    return 0;
  }
  int maxn = m * 2;
  int th = 0;
  for (int i = 1; i <= m; i++) {
    if (i != a[1]) gl[th][i] = 1;
  }
  for (int i = 1; i < n; i++) {
    double sum = 0;
    for (int j = 1; j <= maxn + 2 * m; j++) {
      if (j > a[i + 1])
        gl[th ^ 1][j] += (sum - gl[th][j - a[i + 1]]) / (m - 1);
      else
        gl[th ^ 1][j] += sum / (m - 1);
      if (j > m) sum -= gl[th][j - m];
      sum += gl[th][j];
    }
    maxn += m;
    for (int j = 1; j <= maxn; j++) gl[th][j] = 0;
    th ^= 1;
  }
  double s = 0;
  for (int i = 1; i < S; i++) s += gl[th][i];
  printf("%.9f\n", s + 1);
}
