#include <bits/stdc++.h>
using namespace std;
int const LIM0 = 1001;
int const LIM1 = 200000;
int k[LIM0], n, m;
double dp[2][LIM1];
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  cin >> n >> m;
  if (m == 1) {
    cout << 1.0 << endl;
    return 0;
  }
  for (int i = 0; i < n; ++i) cin >> k[i];
  for (int i = 1; i <= m; ++i) dp[0][i] = (i == k[0] ? 0 : 1);
  int place = k[0];
  for (int i = 0; i < n - 1; ++i) {
    place += k[i + 1];
    for (int j = 1; j + m + 1 < LIM1; ++j) {
      dp[1][j + 1] += dp[0][j] * 1.0 / (m - 1);
      dp[1][j + m + 1] -= dp[0][j] * 1.0 / (m - 1);
      dp[1][j + k[i + 1]] -= dp[0][j] * 1.0 / (m - 1);
      dp[1][j + k[i + 1] + 1] += dp[0][j] * 1.0 / (m - 1);
    }
    for (int j = 1; j < LIM1; ++j) dp[1][j] += dp[1][j - 1];
    for (int j = 0; j < LIM1; ++j) {
      dp[0][j] = dp[1][j];
      dp[1][j] = 0;
    }
  }
  double answer = 0;
  for (int i = 0; i < place; ++i) answer += dp[0][i];
  cout << answer + 1 << endl;
  return 0;
}
