#include <bits/stdc++.h>
using namespace std;
double prob[2][100047];
double sprob[100047];
int main() {
  int N, M;
  cin >> N >> M;
  if (M == 1) {
    cout << "1" << endl;
    return 0;
  }
  vector<int> K(N);
  int Krank = 0;
  for (int &k : K) {
    cin >> k;
    Krank += k;
  }
  prob[0][0] = 1;
  for (int n = 0; n < N; ++n) {
    int prev = n & 1, curr = 1 - prev;
    sprob[0] = 0;
    for (int i = 0; i <= Krank; ++i) sprob[i + 1] = sprob[i] + prob[prev][i];
    for (int i = 0; i <= Krank; ++i) {
      prob[curr][i] = sprob[i] - (i - M >= 0 ? sprob[i - M] : 0) -
                      (i - K[n] >= 0 ? prob[prev][i - K[n]] : 0);
      prob[curr][i] /= M - 1;
    }
  }
  double better = 0;
  for (int i = 1; i < Krank; ++i) better += prob[N & 1][i];
  better *= M - 1;
  cout << fixed << setprecision(15) << (better + 1) << endl;
}
