#include <bits/stdc++.h>
using namespace std;
int n, m, sum, x;
double nex[100005], dp[100005], s[100005];
void work(int x) {
  for (int i = 0; i <= 100000; i++) s[i + 1] = s[i] + dp[i];
  for (int i = 0; i <= 100000; i++) {
    nex[i] = s[i] - s[max(0, i - m)];
    if (i - x >= 0) nex[i] -= dp[i - x];
    nex[i] /= m - 1;
  }
  for (int i = 0; i <= 100000; i++) dp[i] = nex[i];
}
int main() {
  dp[0] = 1.0;
  cin >> n >> m;
  if (m == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    sum += x;
    work(x);
  }
  double ans = 0.0;
  for (int i = 0; i < sum; i++) ans += dp[i];
  ans = ans * (m - 1) + 1.0;
  printf("%.15f\n", ans);
}
