#include <bits/stdc++.h>
using namespace std;
int n, m;
double prob[2][100000 + 1];
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) {
    printf("%.10lf\n", 1.0);
    return 0;
  }
  prob[0][0] = 1.0;
  double factor = 1.0 / (m - 1);
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    int p;
    scanf("%d", &p);
    sum += p;
    int curr = i % 2;
    int next = (i + 1) % 2;
    double prob_sum = 0.0;
    for (int x = 0; x <= (i + 1) * m; ++x) {
      if (x > m) {
        prob_sum -= prob[curr][x - m - 1];
      }
      prob[next][x] = prob_sum * factor;
      if (x >= p) {
        prob[next][x] -= prob[curr][x - p] * factor;
      }
      prob_sum += prob[curr][x];
    }
  }
  double expected_rank = 1.0;
  int curr = n % 2;
  for (int i = 1; i < sum; ++i) {
    expected_rank += (m - 1) * prob[curr][i];
  }
  printf("%.10lf\n", expected_rank);
  return 0;
}
