#include <bits/stdc++.h>
using namespace std;
using namespace std;
bool solve(int);
int main() {
  int test = 0;
  while (solve(test++))
    ;
  return 0;
}
const int N = 105;
const int M = 1000;
long double dp[2][N * M];
int pl[N];
long double s[N * M];
int n, m;
bool solve(int) {
  if (!(cin >> n >> m)) return false;
  for (int i = 0; i < int(n); ++i) cin >> pl[i];
  memset(dp, 0, sizeof(dp));
  if (m == 1) {
    puts("1");
    return true;
  }
  int t = 0;
  dp[t][0] = m - 1;
  for (int i = 0; i < int(n); ++i) {
    s[0] = 0;
    for (int j = 0; j < int(n * m + 1); ++j) s[j + 1] = dp[t][j] + s[j];
    for (int j = 0; j < int(n * m + 1); ++j) {
      long double sum = s[j] - s[max(0, j - m)];
      if (j - pl[i] >= 0) sum -= dp[t][j - pl[i]];
      dp[!t][j] = sum / (m - 1);
    }
    t = !t;
  }
  int score = 0;
  for (int i = 0; i < int(n); ++i) score += pl[i];
  long double sum = 0;
  for (int i = 0; i < int(n * m); ++i) sum += dp[t][i];
  long double res = 0;
  for (int i = 0; i < int(score); ++i) res += dp[t][i];
  cout << fixed << setprecision(10) << res + 1 << endl;
  return true;
}
