#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n, m, X[105];
double dp[2][maxn];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &X[i]);
  if (m == 1)
    printf("%.15f", 1.0);
  else {
    int nw = 0, nx = 1, s = 0;
    memset(dp[nx], 0, sizeof(dp[nx]));
    dp[nx][0] = (m - 1) * 1000;
    for (int i = 1; i <= n; i++) {
      swap(nw, nx);
      memset(dp[nx], 0, sizeof(dp[nx]));
      for (int j = 0; j <= i * m; j++) {
        double p = dp[nw][j] / (m - 1);
        dp[nx][j + 1] += p;
        dp[nx][j + m + 1] -= p;
        dp[nx][j + X[i]] -= p;
        dp[nx][j + X[i] + 1] += p;
      }
      for (int j = 1; j <= (i + 1) * m; j++) dp[nx][j] += dp[nx][j - 1];
      s += X[i];
    }
    double ans = 0;
    for (int i = 0; i < s; i++) ans += dp[nx][i];
    printf("%.15lf\n", ans / 1000 + 1);
  }
}
