#include <bits/stdc++.h>
using namespace std;
int N, M;
int Sum = 0;
double F[100010] = {0};
double G[110][100010] = {{0}};
int Choose[110] = {0};
int main() {
  cin >> N >> M;
  for (int i = 1; i <= N; i++) {
    scanf("%d", &Choose[i]);
    Sum += Choose[i];
  }
  G[0][0] = 1;
  for (int i = 1; i <= N; i++) {
    double SS = G[i - 1][0];
    for (int j = 1; j <= Sum; j++) {
      if (j - M - 1 >= 0) SS -= G[i - 1][j - M - 1];
      if (j - Choose[i] >= 0) SS -= G[i - 1][j - Choose[i]];
      G[i][j] += SS / (M - 1);
      SS += G[i - 1][j];
      if (j - Choose[i] >= 0) SS += G[i - 1][j - Choose[i]];
    }
  }
  for (int i = N + 1; i <= Sum; i++) F[i] = F[i - 1] + (G[N][i - 1]) * (M - 1);
  printf("%.16lf\n", F[Sum] + 1);
  return 0;
}
