#include <bits/stdc++.h>
using namespace std;
int n, m, sum, A[100005];
double ans, dp[2][100005 + 1005];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1, x; i <= n; i++) {
    scanf("%d", &A[i]);
    sum += A[i];
  }
  if (m == 1) {
    ans = 1;
    printf("%.10f\n", ans);
    return 0;
  }
  int now = 0;
  dp[now][0] = m - 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= sum; j++) {
      double res = 1.0 * dp[now][j] / (m - 1);
      dp[!now][j + 1] += res;
      dp[!now][j + m + 1] -= res;
      dp[!now][j + A[i]] -= res;
      dp[!now][j + A[i] + 1] += res;
    }
    memset(dp[now], 0, sizeof(dp[now]));
    now = !now;
    for (int j = 1; j <= sum; j++) dp[now][j] += dp[now][j - 1];
  }
  for (int i = 1; i < sum; i++) ans += dp[now][i];
  printf("%.10lf\n", ans + 1);
  return 0;
}
