#include <bits/stdc++.h>
using namespace std;
int N, M;
const int NMax = 105;
int Perm[NMax], cnt;
double DP[NMax][100005], DP2[NMax][100005];
void Read() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &Perm[i]);
    cnt += Perm[i];
  }
}
void Solve() {
  DP2[0][0] = M - 1;
  for (int i = 0; i <= N * M; i++) DP[0][i] = M - 1;
  for (int i = 1; i <= N; i++) {
    for (int j = i; j <= i * M; j++) {
      if (j >= Perm[i]) {
        DP[i][j] = DP2[i - 1][j - Perm[i] + 1] - DP2[i - 1][j];
        DP[i][j] += DP[i - 1][j - Perm[i] - 1];
        if (j - M - 1 >= 0) DP[i][j] -= DP[i - 1][j - M - 1];
      } else {
        DP[i][j] = DP[i - 1][j - 1];
      }
    }
    for (int j = N * M; j >= 1; j--)
      DP2[i][j] = DP2[i][j + 1] + DP[i][j] / (M - 1);
    for (int j = 1; j <= N * M; j++)
      DP[i][j] = DP[i][j - 1] + DP[i][j] / (M - 1);
  }
  cout << fixed << setprecision(15) << (DP[N][cnt - 1]) + 1 << "\n";
}
int main() {
  Read();
  if (M == 1) {
    cout << "1.000000000000000\n";
    return 0;
  }
  Solve();
  return 0;
}
