#include <bits/stdc++.h>
using namespace std;
int n, m, sum, c[110];
double ans, s[110 * 1010], dp[110][110 * 1010];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]), sum += c[i];
  dp[0][0] = 1;
  s[0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= i * m; j++) {
      int l = max(j - m, i - 1), r = min((i - 1) * m, j - 1);
      dp[i][j] = s[r];
      if (l > 0) dp[i][j] -= s[l - 1];
      if (l <= j - c[i] && j - c[i] <= r) dp[i][j] -= dp[i - 1][j - c[i]];
      dp[i][j] /= (m - 1);
    }
    for (int j = 1; j <= i * m; j++) s[j] = s[j - 1] + dp[i][j];
  }
  for (int i = n; i < sum; i++) ans += dp[n][i];
  printf("%.15lf\n", 1 + (m - 1) * ans);
  return 0;
}
