#include <bits/stdc++.h>
using namespace std;
int n, m, x[110], score;
double dp[2][100010], sum[2][100010];
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("1\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
    score += x[i];
  }
  for (int s = 1; s <= m; s++)
    if (s != x[1]) dp[1][s] = 1.0 / (m - 1);
  for (int s = 1; s <= score; s++) sum[1][s] = sum[1][s - 1] + dp[1][s];
  for (int i = 2; i <= n; i++) {
    for (int s = 0; s <= score; s++) dp[i & 1][s] = sum[i & 1][s] = 0;
    for (int s = 1; s <= score; s++) {
      dp[i & 1][s] =
          (sum[(i - 1) & 1][s - 1] -
           sum[(i - 1) & 1][((0) > (s - m - 1) ? (0) : (s - m - 1))] -
           dp[(i - 1) & 1][((0) > (s - x[i]) ? (0) : (s - x[i]))]) /
          (m - 1);
      sum[i & 1][s] = sum[i & 1][s - 1] + dp[i & 1][s];
    }
  }
  printf("%.9lf\n", sum[n & 1][score - 1] * (m - 1) + 1);
  return 0;
}
