#include <bits/stdc++.h>
using namespace std;
const int MAXM = 1e5 + 1005;
double s[2][MAXM] = {0};
double query(int now, int f) { return now < 0 ? 0 : s[f][now]; }
int main() {
  int n, m, k, pre = 0, now = 1, my = 0;
  double pos;
  scanf("%d%d", &n, &m);
  for (int i = 0; i <= n * m; i++) {
    s[0][i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &k);
    my += k;
    for (int j = 0; j < i; j++) {
      s[now][j] = 0;
    }
    for (int j = i; j <= n * m; j++) {
      pos = query(j - 1, pre) - query(j - m - 1, pre) - query(j - k, pre) +
            query(j - k - 1, pre);
      s[now][j] = s[now][j - 1] + pos * 1.0 / (m - 1);
    }
    pre ^= 1, now ^= 1;
  }
  double ans = s[pre][my - 1];
  ans = ans * (m - 1) + 1;
  printf("%.10lf\n", ans);
}
