#include <bits/stdc++.h>
using namespace std;
inline long long int gcd(long long int a, long long int b) {
  long long int t;
  while (b) {
    a = a % b;
    t = a;
    a = b;
    b = t;
  }
  return a;
}
using namespace std;
const int MAXN = (long long int)1e5 + 50;
double dp[MAXN];
double curr[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  scanf("%d %d", &n, &m);
  if (m == 1) {
    puts("1.00000000000000");
    return 0;
  }
  for (int i = 0; i < MAXN; i++) dp[i] = 0.0;
  dp[0] = 1.0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int c;
    scanf("%d", &c);
    sum += c;
    double now = 0.0;
    for (int j = 0; j < MAXN; j++) {
      curr[j] = dp[j];
      double vl = now;
      if (j >= c) vl -= curr[j - c];
      now += dp[j];
      dp[j] = vl / (double)(m - 1);
      if (j >= m) now -= curr[j - m];
    }
  }
  double all = 0.0;
  for (int i = 0; i < sum; i++) all += dp[i];
  printf("%.13f\n", all * (double)(m - 1) + 1.0);
  return 0;
}
