#include <bits/stdc++.h>
using namespace std;
const int N = 105;
const int M = 1005;
const int mod = 1e9 + 7;
int n, m, a[N], tot;
long double dp[2][N * M], pre[N * M];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    tot += a[i];
  }
  if (m == 1) return cout << 1.0, 0;
  dp[0][0] = 1.0;
  for (int i = 0; i < n; ++i) {
    pre[0] = dp[i % 2][0];
    for (int second = 1; second <= n * m; ++second)
      pre[second] = pre[second - 1] + dp[i % 2][second];
    for (int second = 0; second <= n * m; ++second) {
      long double val = 0;
      if (second > 0) val += pre[second - 1];
      if (second - m > 0) val -= pre[second - m - 1];
      if (second >= a[i]) val -= dp[i % 2][second - a[i]];
      dp[(i + 1) % 2][second] = val / (m - 1);
    }
  }
  long double ans = 0;
  for (int i = 0; i < tot; ++i) ans += dp[n % 2][i];
  printf("%.9f\n", (double)(ans * (m - 1) + 1));
  return 0;
}
