#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105, MAXM = 1005;
double dp[MAXN * MAXM], s[MAXN * MAXM];
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("%.15lf\n", 1.0);
    return 0;
  }
  vector<int> x(n + 1);
  int sum = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &x[i]);
    sum += x[i];
  }
  dp[0] = 1.0;
  for (int i = 1; i <= n; ++i) {
    int M = i * m;
    s[0] = dp[0];
    for (int j = 1; j <= M; ++j) {
      s[j] = s[j - 1] + dp[j];
    }
    for (int j = M; j >= 1; --j) {
      double g = s[j - 1] - (j - m - 1 >= 0 ? s[j - m - 1] : 0);
      if (j - x[i] >= 0) {
        g -= dp[j - x[i]];
      }
      dp[j] = g / (m - 1);
    }
    dp[0] = 0.0;
  }
  double res = 0.0;
  for (int j = 0; j < sum; ++j) {
    res += dp[j];
  }
  res = res * (m - 1) + 1.0;
  printf("%.15lf\n", (double)res);
  return 0;
}
