#include <bits/stdc++.h>
using namespace std;
int pos[110];
double dp[1100000];
double tmp[1100000];
double sum[1100000];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &pos[i]);
  if (m == 1) {
    printf("%.12lf\n", 1.0);
    return 0;
  }
  for (int j = 1; j <= m; j++) {
    if (j == pos[1])
      dp[j] = 0;
    else
      dp[j] = 1 / (double)(m - 1);
  }
  for (int j = 1; j <= n * m; j++) sum[j] = sum[j - 1] + dp[j];
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= n * m; j++) {
      if (j >= m + 1)
        tmp[j] = sum[j - 1] - sum[j - m - 1];
      else
        tmp[j] = sum[j - 1];
      if (j > pos[i]) tmp[j] -= dp[j - pos[i]];
      tmp[j] /= (double)(m - 1);
    }
    for (int j = 1; j <= n * m; j++) {
      dp[j] = tmp[j];
      sum[j] = sum[j - 1] + tmp[j];
    }
  }
  int val = 0;
  for (int i = 1; i <= n; i++) val += pos[i];
  printf("%.12lf\n", sum[val - 1] * (m - 1) + 1);
  return 0;
}
