#include <bits/stdc++.h>
using namespace std;
int pos[105];
double Expected[105][100005], sum_expected[105][100005];
int main() {
  int N, M;
  int sum = 0;
  scanf("%d %d", &N, &M);
  if (M == 1) {
    double ans = 1.0;
    printf("%.16lf\n", ans);
    return 0;
  }
  for (int x = 0; x < N; x++) {
    scanf("%d", &pos[x + 1]);
    sum += pos[x + 1];
  }
  Expected[0][0] = M - 1;
  sum_expected[0][0] = Expected[0][0];
  for (int k = 1; k <= N * M; k++) sum_expected[0][k] = sum_expected[0][k - 1];
  for (int x = 1; x <= N; x++) {
    for (int k = 1; k <= N * M; k++) {
      Expected[x][k] = sum_expected[x - 1][k - 1];
      if (k > M) Expected[x][k] -= sum_expected[x - 1][k - M - 1];
      if (k >= pos[x]) Expected[x][k] -= Expected[x - 1][k - pos[x]];
      Expected[x][k] /= (M - 1);
      sum_expected[x][k] = sum_expected[x][k - 1] + Expected[x][k];
    }
  }
  double ans = 0;
  for (int i = 0; i < sum; i++) {
    ans += Expected[N][i];
  }
  printf("%.16lf\n", ans + 1.0000000000);
  return 0;
}
