#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e10;
const int N = 1e9;
int n, m, k, t, sum;
int a[110];
double dp[110][100010], pre[100010];
int main() {
  scanf("%d%d", &n, &m);
  sum = 0;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), sum += a[i];
  memset(dp, 0, sizeof(dp));
  dp[0][0] = m - 1;
  for (int i = 1; i <= n; i++) {
    pre[0] = dp[i - 1][0];
    for (int j = 1; j <= i * m; j++) pre[j] = pre[j - 1] + dp[i - 1][j];
    for (int j = i; j <= i * m; j++) {
      dp[i][j] = pre[j - 1] - (j - m - 1 < 0 ? 0 : pre[j - m - 1]) -
                 (j - a[i] < 0 ? 0 : dp[i - 1][j - a[i]]);
      dp[i][j] /= m - 1;
    }
  }
  double ans = 0;
  for (int i = n; i < sum; i++) {
    ans += dp[n][i];
  }
  ans += 1.0;
  printf("%.9lf\n", ans);
  return 0;
}
