#include <bits/stdc++.h>
using namespace std;
double ex[2][105 * 1005];
double sum[2][105 * 1005];
int a[105];
int main() {
  int n, m;
  while (cin >> n >> m) {
    int up = n * m;
    int down = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      down += a[i];
    }
    if (m == 1) {
      cout << 1 << endl;
      continue;
    }
    memset(ex, 0, sizeof(ex));
    ex[0][0] = m - 1;
    for (int i = 0; i <= up; i++) sum[0][i] = m - 1;
    for (int i = 1; i <= n; i++) {
      int f = i & 1;
      ex[f][0] = 0;
      memset(sum[f], 0, sizeof(sum[f]));
      for (int j = 1; j <= up; j++) {
        double total = sum[1 - f][j - 1];
        if (j - m - 1 >= 0) total -= sum[1 - f][j - m - 1];
        if (j >= a[i]) {
          total -= sum[1 - f][j - a[i]];
          if (j - a[i] > 0) total += sum[1 - f][j - a[i] - 1];
        }
        ex[f][j] = total / (double)(m - 1);
        sum[f][j] = sum[f][j - 1] + ex[f][j];
      }
    }
    int f = n & 1;
    double ans = 0;
    for (int i = 0; i <= down - 1; i++) ans += ex[f][i];
    printf("%.13f\n", 1.0 + ans);
  }
  return 0;
}
