#include <bits/stdc++.h>
using namespace std;
vector<long double> dp[101];
int n, m;
vector<int> ranks;
vector<long double> masterdp[101];
int threshold = 0;
long double computeProb(int thlonsleft, int scoreleft) {
  if (scoreleft <= 0) return 0;
  if (thlonsleft == 0) return 1;
  if (dp[thlonsleft][scoreleft] != -1) return dp[thlonsleft][scoreleft];
  long double acc = 0;
  if (scoreleft == threshold || dp[thlonsleft][scoreleft + 1] == -1) {
    for (int i = 0; i < m; i++) {
      if (i + 1 != ranks[n - thlonsleft]) {
        acc += (computeProb(thlonsleft - 1, scoreleft - (i + 1))) /
               ((long double)(m - 1));
      }
    }
  } else {
    long double tailoffset = computeProb(thlonsleft - 1, scoreleft - m) -
                             computeProb(thlonsleft - 1, scoreleft);
    long double forbiddenoffset =
        computeProb(thlonsleft - 1, scoreleft + 1 - ranks[n - thlonsleft]) -
        computeProb(thlonsleft - 1, scoreleft - ranks[n - thlonsleft]);
    acc = dp[thlonsleft][scoreleft + 1] +
          ((tailoffset + forbiddenoffset) / ((long double)(m - 1)));
  }
  dp[thlonsleft][scoreleft] = acc;
  return acc;
}
int main() {
  cin >> n >> m;
  ranks = vector<int>(n);
  for (int i = 0; i < n; i++) {
    cin >> ranks[i];
    threshold += ranks[i];
  }
  for (int i = 0; i < n + 1; i++) {
    dp[i] = vector<long double>(threshold + 1, -1);
  }
  long double probless = computeProb(n, threshold);
  long double answer = probless * ((long double)(m - 1)) + 1;
  cout << setprecision(12) << answer << endl;
  return 0;
}
