#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9, pi = acos(-1.0);
double dp[101][102000];
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int sum = 0;
  dp[0][0] = 1;
  cout << setprecision(12) << fixed;
  if (m == 1) {
    cout << 1.0 << endl;
    return 0;
  }
  for (int i = 0; i < (int)(n); i++) {
    for (int j = 0; j < (int)(100010); j++) {
      dp[i + 1][j + 1] += dp[i][j] / (m - 1);
      dp[i + 1][j + m + 1] -= dp[i][j] / (m - 1);
    }
    for (int j = 0; j < (int)(100010); j++) dp[i + 1][j + 1] += dp[i + 1][j];
    for (int j = 0; j < (int)(100010); j++)
      dp[i + 1][j + a[i]] -= dp[i][j] / (m - 1);
    sum += a[i];
  }
  double res = 0;
  for (int i = 0; i < (int)(sum); i++) res += dp[n][i];
  cout << res * (m - 1) + 1 << endl;
  return 0;
}
