#include <bits/stdc++.h>
const int oo = 0x3f3f3f3f;
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
template <typename T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <typename T>
T read(T &first) {
  int f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (first = 0; isdigit(ch); ch = getchar()) first = 10 * first + ch - '0';
  return first *= f;
}
template <typename T>
void write(T first) {
  if (first < 0) {
    putchar('-');
    first = -first;
  }
  static char s[20];
  int top = 0;
  for (; first; first /= 10) s[++top] = first % 10 + '0';
  if (top == 0)
    putchar('0');
  else
    while (top) putchar(s[top--]);
}
const int MAXN = 105, MAXM = 1005;
int N, M, A[MAXN];
void input() {
  read(N);
  read(M);
  for (int i = 1; i <= N; ++i) {
    read(A[i]);
  }
}
void solve() {
  if (M == 1) {
    puts("1");
    return;
  }
  static double dp[2][MAXN * MAXM], sum[MAXN * MAXM];
  int cur = 0, nxt = 1;
  dp[nxt][0] = M - 1;
  for (int i = 1; i <= N; ++i) {
    cur ^= 1;
    nxt ^= 1;
    sum[0] = dp[cur][0];
    memset(dp[nxt], 0, sizeof(dp[nxt]));
    for (int j = 1, bnd = i * M; j <= bnd; ++j) {
      sum[j] = sum[j - 1] + dp[cur][j];
      double t = sum[j - 1];
      if (j - M - 1 >= 0) t -= sum[j - M - 1];
      if (j - A[i] >= 0) t -= dp[cur][j - A[i]];
      dp[nxt][j] = t / (M - 1);
    }
  }
  int s = 0;
  for (int i = 1; i <= N; ++i) {
    s += A[i];
  }
  double ans = 0;
  for (int i = 0; i < s; ++i) {
    ans += dp[nxt][i];
  }
  printf("%.12f\n", ans + 1);
}
int main() {
  input();
  solve();
  return 0;
}
