#include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int M = 1010;
double dp[N][N * M];
int n, m, a[N];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i <= n * m; i++) dp[0][i] = m - 1;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n * m; j++) {
      if (a[i] > 1) {
        dp[i][j] += dp[i - 1][j - 1] / (m - 1);
        if (j - a[i] >= 0) dp[i][j] -= dp[i - 1][j - a[i]] / (m - 1);
      }
      if (a[i] < m) {
        if (j - a[i] - 1 >= 0) dp[i][j] += dp[i - 1][j - (a[i] + 1)] / (m - 1);
        if (j - m - 1 >= 0) dp[i][j] -= dp[i - 1][j - m - 1] / (m - 1);
      }
      dp[i][j] += dp[i][j - 1];
    }
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) sum += a[i];
  double ans = dp[n][sum - 1] + 1;
  printf("%.10f\n", ans);
}
