#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, now, la, sum, a[200001];
double f[2][200010], ans, p;
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  if (m == 1) return puts("1.00000000000000000"), 0;
  f[0][0] = m - 1;
  for (i = 1; i <= n; i++) {
    now = i & 1;
    la = now ^ 1;
    memset(f[now], 0, sizeof(f[now]));
    for (j = 0; j <= (i - 1) * m; j++) {
      p = f[la][j] / (m - 1);
      f[now][j + 1] += p;
      f[now][j + m + 1] -= p;
      f[now][j + a[i]] -= p;
      f[now][j + a[i] + 1] += p;
    }
    for (j = 1; j <= i * m; j++) f[now][j] += f[now][j - 1];
  }
  for (i = 1; i < sum; i++) ans += f[n & 1][i];
  printf("%.13lf", ans + 1);
}
