#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
double dp[110005], sum[110005];
int n, m;
int main() {
  cin >> n >> m;
  int k = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    k += a;
    for (int j = (i + 1) * m; j; j--) {
      if (i == 0) {
        if (j != a) dp[j] = double(1) / double(m - 1);
      } else {
        dp[j] =
            (sum[j - 1] - sum[max(0, j - m - 1)] - (j > a ? dp[j - a] : 0)) /
            (m - 1);
      }
    }
    for (int j = 1; j <= (i + 2) * m; j++) sum[j] = sum[j - 1] + dp[j];
  }
  if (m == 1)
    cout << 1;
  else
    cout << fixed << setprecision(10) << sum[k - 1] * (m - 1) + 1;
  return 0;
}
