#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
const int M = 1e5 + 5;
int n, m;
double dp[2][M];
double sum[2][M];
int a[N];
double C[N][N];
void work() {
  scanf("%d%d", &n, &m);
  int s = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  if (m == 1) {
    puts("1.000000000");
    return;
  }
  int d = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < M; j++) sum[d][j] = dp[d][j] = 0;
    for (int j = i; j <= i * m; j++) {
      if (i == 1) {
        dp[d][j] = (a[1] != j);
        continue;
      }
      if (j - m - 1 < 0) {
        dp[d][j] = sum[d ^ 1][j - 1];
      } else {
        dp[d][j] = sum[d ^ 1][j - 1] - sum[d ^ 1][j - m - 1];
      }
      if (j >= a[i]) dp[d][j] -= dp[d ^ 1][j - a[i]];
    }
    for (int j = 1; j < M; j++) {
      sum[d][j] = sum[d][j - 1] + dp[d][j];
    }
    d ^= 1;
  }
  double x = sum[d ^ 1][s - 1];
  for (int i = 1; i <= n; i++) x /= (m - 1);
  printf("%.10f\n", 1 + x * (m - 1));
  return;
}
int main() {
  work();
  return 0;
}
