#include <bits/stdc++.h>
using namespace std;
double tree[100050];
double dp[100050];
int me[105];
int n, m;
int ss;
double findans(int tar) {
  double sum = 0;
  while (tar > 0) {
    sum += tree[tar];
    tar -= tar & (-tar);
  }
  return sum;
}
void updat(int tar, double num) {
  while (tar < ss) {
    tree[tar] += num;
    tar += tar & (-tar);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  memset(dp, 0, sizeof(dp));
  memset(tree, 0, sizeof(tree));
  ss = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &me[i]);
    ss += me[i];
  }
  if (m == 1) {
    printf("1.0000000000000000\n");
    return 0;
  }
  for (int j = 1; j <= m; j++) {
    dp[j] = 1;
  }
  dp[me[1]] = 0;
  for (int j = 1; j < ss; j++) {
    updat(j, dp[j]);
  }
  for (int i = 2; i <= n; i++) {
    memset(dp, 0, sizeof(dp));
    for (int j = i; j < ss; j++) {
      int k;
      dp[j] += findans(j - 1) / (m - 1);
      k = j - m - 1;
      if (k >= i - 1) dp[j] -= findans(k) / (m - 1);
      if (j - i + 1 >= me[i]) {
        dp[j] -= findans(j - me[i]) / (m - 1);
        if (j - me[i] - 1 >= i - 1) {
          dp[j] += findans(j - me[i] - 1) / (m - 1);
        }
      }
    }
    memset(tree, 0, sizeof(tree));
    for (int j = i; j < ss; j++) {
      updat(j, dp[j]);
    }
  }
  printf("%.16lf\n", findans(ss - 1) + 1);
}
