#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, INF = 0x3f3f3f3f, MOD = 1e9 + 7;
int n, m, a[N];
double f[2][N];
int main() {
  ios_base::sync_with_stdio(0);
  while (scanf("%d%d", &n, &m) == 2) {
    int sum = 0;
    for (int i = 1; i <= n; ++i) {
      scanf("%d", a + i);
      sum += a[i];
    }
    if (m == 1) {
      puts("1");
      continue;
    }
    int cur = 0, nxt = 1;
    memset(f[cur], 0, sizeof f[cur]);
    f[cur][0] = m - 1;
    for (int i = 0; i < n; ++i) {
      memset(f[nxt], 0, sizeof f[nxt]);
      for (int j = 0; j <= i * m; ++j) {
        double p = f[cur][j] / (m - 1);
        f[nxt][j + 1] += p;
        f[nxt][j + m + 1] -= p;
        f[nxt][j + a[i + 1]] -= p;
        f[nxt][j + a[i + 1] + 1] += p;
      }
      for (int j = 1; j <= n * m; ++j) f[nxt][j + 1] += f[nxt][j];
      swap(cur, nxt);
    }
    double ans = 0;
    for (int i = 0; i < sum; ++i) ans += f[cur][i];
    printf("%.12f\n", ans + 1);
  }
  return 0;
}
