#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> x(n);
  int total = 0;
  for (int i = 0; i != n; i++) {
    cin >> x[i];
    total += x[i];
  }
  if (total == n) {
    cout << 1 << endl;
    return 0;
  }
  double dp[n + 1][m * n + 1];
  dp[0][0] = m - 1;
  for (int i = 1; i != n + 1; i++) {
    dp[i][0] = 0;
  }
  for (int i = 1; i != m * n + 1; i++) {
    dp[0][i] = 0;
  }
  double sum;
  for (int i = 1; i != n + 1; i++) {
    sum = 0;
    for (int j = 1; j != m * n + 1; j++) {
      if (j > m) {
        sum = sum - dp[i - 1][j - 1 - m];
      }
      sum = sum + dp[i - 1][j - 1];
      if (j >= x[i - 1]) {
        dp[i][j] = (sum - dp[i - 1][j - x[i - 1]]) / (m - 1);
      } else {
        dp[i][j] = (sum) / (m - 1);
      }
    }
  }
  double ans = 1;
  for (int i = 0; i != total; i++) {
    ans += dp[n][i];
  }
  printf("%.9f\n", ans);
}
