#include <bits/stdc++.h>
const int precision = 15;
using namespace std;
const int limite = 200000;
int n, m;
double p[limite];
double nextp[limite];
int main() {
  cout.setf(ios::fixed);
  cout.precision(precision);
  cin >> n >> m;
  if (m == 1) {
    cout << 1.0 << endl;
    exit(0);
  }
  for (int i = 0; i < limite; i++) p[i] = 0;
  p[0] = 1;
  int suma = 0;
  for (int paso = 1; paso <= n; paso++) {
    int x;
    cin >> x;
    suma += x;
    double sumap = 0;
    for (int i = 0; i < limite; i++) {
      nextp[i] = sumap / (m - 1);
      if (i - x >= 0) nextp[i] -= p[i - x] / (m - 1);
      sumap += p[i];
      if (i - m >= 0) sumap -= p[i - m];
    }
    for (int i = 0; i < limite; i++) p[i] = nextp[i];
    for (int i = 0; i < limite; i++) nextp[i] = 0;
  }
  double e = 0;
  for (int i = 0; i < suma; i++) e += p[i];
  e = 1 + e * (m - 1);
  cout << e << endl;
}
