#include <bits/stdc++.h>
using namespace std;
double dp[101][100005];
double sum[101][100005];
int ar[1001], a[1001];
int main() {
  int n, m, l;
  a[0] = 0.0;
  double k;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    scanf("%d", &ar[i + 1]);
    a[i + 1] = a[i] + ar[i + 1];
  }
  for (int i = 1; i < m + 1; i++) dp[1][i] = 1.0;
  dp[1][ar[1]] = 0.0;
  for (int i = 1; i < 2 * m + 1; i++) {
    sum[1][i] = sum[1][i - 1] + dp[1][i];
  }
  for (int i = 2; i < n + 1; i++) {
    k = (double)1 / (m - 1);
    for (int j = i; j < i * m + 1; j++) {
      l = max(i - 2, j - m - 1);
      dp[i][j] = k * (sum[i - 1][j - 1] - sum[i - 1][l]);
      dp[i][j] -= k * dp[i - 1][j - ar[i]];
    }
    for (int j = i; j < i * m + m + 1; j++)
      sum[i][j] = sum[i][j - 1] + dp[i][j];
  }
  double b = 0;
  for (int i = n; i < a[n]; i++) b += dp[n][i];
  printf("%.13lf\n", b + 1);
}
