#include <bits/stdc++.h>
int n, m;
long double dp[2][100000 + 5];
double work() {
  if (m == 1) {
    return 1.0;
  }
  int cur = 0, next = 1;
  dp[0][0] = 1;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    sum += x;
    memset(dp[next], 0, sizeof(dp[next]));
    for (int j = i; j <= i * m; j++) {
      long double p = dp[cur][j] / (m - 1);
      dp[next][j + 1] += p;
      dp[next][j + m + 1] -= p;
      dp[next][j + x] -= p;
      dp[next][j + x + 1] += p;
    }
    for (int j = 1; j <= (i + 1) * m; j++) {
      dp[next][j] += dp[next][j - 1];
    }
    std::swap(cur, next);
  }
  long double ret = 0;
  for (int i = 0; i < sum; i++) {
    ret += dp[cur][i];
  }
  return double(ret * (m - 1) + 1);
}
int main() {
  scanf("%d%d", &n, &m);
  printf("%.20f\n", work());
  return 0;
}
