#include <bits/stdc++.h>
using namespace std;
const int N = 101, M = 1001;
int n, m;
int x[M];
long double dp[2][N * M];
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("%.9lf\n", 1.0f);
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 1; i <= m; i++) {
    dp[1][i] = (double)1.0f / (m - 1);
    if (i == x[1]) dp[1][i] = 0;
  }
  int id = 1;
  for (int i = 2; i <= n; i++) {
    id = i % 2;
    for (int j = i - 1; j < N * M; j++) dp[1 - id][j] += dp[1 - id][j - 1];
    for (int j = 0; j < N * M; j++) dp[id][j] = 0;
    for (int j = i; j <= i * m; j++) {
      if (j <= m) {
        dp[id][j] = dp[1 - id][j - 1];
        if (j > x[i])
          dp[id][j] -= (dp[1 - id][j - x[i]] - dp[1 - id][j - x[i] - 1]);
        dp[id][j] /= (m - 1);
      } else {
        dp[id][j] = dp[1 - id][j - 1] - dp[1 - id][j - m - 1];
        dp[id][j] -= (dp[1 - id][j - x[i]] - dp[1 - id][j - x[i] - 1]);
        dp[id][j] /= (m - 1);
      }
    }
  }
  long double sum1 = 0;
  for (int i = 1; i <= n; i++) {
    sum1 += x[i];
  }
  long double sum2 = 0;
  for (int i = 0; i < sum1; i++) {
    sum2 += dp[id][i];
  }
  sum2 *= (m - 1);
  printf("%.9lf\n", (double)sum2 + 1);
  return 0;
}
