#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, s, a[N];
double dp[N], t[N], sum[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    s += a[i];
  }
  dp[0] = 1;
  for (int i = 0; i <= n * m; i++) sum[i] = 1;
  for (int i = 1; i <= n; i++) {
    fill(t, t + n * m + 1, 0);
    for (int j = i; j <= i * m; j++) {
      t[j] = (sum[j - 1] - sum[j - m - 1 < 0 ? N - 1 : j - m - 1] -
              dp[j - a[i] < 0 ? N - 1 : j - a[i]]) /
             (m - 1);
    }
    copy(t, t + n * m + 1, dp);
    sum[0] = dp[0];
    for (int j = 1; j <= n * m; j++) sum[j] = sum[j - 1] + dp[j];
  }
  printf("%.12f", sum[s - 1] * (m - 1) + 1);
  return 0;
}
