#include <bits/stdc++.h>
using namespace std;
inline long long myInt() {
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  int flag = 1;
  if (c == '-') flag = -1, c = getchar();
  long long x = 0;
  while (isdigit(c)) {
    x = (x * 10) + (c - '0');
    c = getchar();
  }
  if (-1 == flag) return -x;
  return x;
}
const int INF = 1000000005;
const int N = 100005;
double f[100005];
double p[100005];
int n, m, a[111];
int main() {
  n = myInt();
  m = myInt();
  int S = 0;
  for (int i = 1; i <= n; i++) a[i] = myInt(), S += a[i];
  if (m == 1) {
    puts("1");
    return 0;
  }
  for (int i = 1; i <= m; i++)
    if (i != a[1]) f[i] = 1.0 / (m - 1);
  for (int i = 1; i <= S; i++) f[i] += f[i - 1];
  for (int i = 2; i <= n; i++) {
    int t = a[i];
    for (int j = S; j >= 1; j--) {
      if (j <= t) {
        p[j] = f[j - 1] / (m - 1);
      } else {
        if (j - 1 <= m)
          p[j] = (f[j - 1] - (f[j - t] - f[j - t - 1])) / (m - 1);
        else
          p[j] =
              (f[j - 1] - f[j - m - 1] - (f[j - t] - f[j - t - 1])) / (m - 1);
      }
    }
    f[0] = 0;
    for (int j = 1; j <= S; j++) f[j] = f[j - 1] + p[j];
  }
  double ans = f[S - 1];
  printf("%.13lf\n", ans * (m - 1) + 1);
}
