#include <bits/stdc++.h>
using namespace std;
double o[101][100001];
int sum;
int x[101];
int main() {
  int n, m;
  int sum = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    sum += x[i];
  }
  for (int i = 1; i <= m; i++) {
    o[1][i] = o[1][i - 1];
    if (x[1] != i) o[1][i]++;
  }
  for (int i = 2; i <= n; i++)
    for (int j = i; j <= m * i; j++) {
      o[i][j] = o[i - 1][min(j - 1, m * (i - 1))] - o[i - 1][max(j - m - 1, 0)];
      if (j - x[i] > 0 && j - x[i] <= m * (i - 1))
        o[i][j] -= o[i - 1][j - x[i]] - o[i - 1][j - x[i] - 1];
      o[i][j] /= m - 1;
      o[i][j] += o[i][j - 1];
    }
  cout << fixed << setprecision(12) << o[n][sum - 1] + 1.0 << endl;
  return 0;
}
