#include <bits/stdc++.h>
using namespace std;
double dp[2][100004];
double cum[100004];
int arr[1003];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    sum += arr[i];
  }
  if (m == 1) {
    printf("1");
    return 0;
  }
  dp[0][0] = m - 1;
  cum[0] = dp[0][0];
  for (int i = 1; i <= m * n; i++) {
    cum[i] = cum[i - 1] + dp[0][i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m * n; j++) {
      if (j > m) {
        dp[1][j] = (cum[j - 1] - cum[j - m - 1]) / (double)(m - 1);
      } else {
        dp[1][j] = cum[j - 1] / (m - 1);
      }
      if (j >= arr[i]) {
        dp[1][j] -= (dp[0][j - arr[i]]) / (double)(m - 1);
      }
    }
    cum[0] = dp[1][0];
    for (int j = 0; j <= m * n; j++) {
      dp[0][j] = dp[1][j];
      dp[1][j] = 0;
      if (j != 0) cum[j] = cum[j - 1] + dp[0][j];
    }
  }
  double ans = 0;
  for (int i = 1; i < sum; i++) {
    ans += dp[0][i];
  }
  ans++;
  printf("%.9lf", ans);
}
