#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x7FFFFFFF;
const int MOD = 1e4 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos(0.0);
const int maxn = 1e6 + 66;
double dp[2][maxn];
double QQ(int flag, int val) {
  if (val < 0)
    return 0;
  else
    return dp[flag][val];
}
int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) != EOF) {
    for (int i = 0; i <= n * m; i++) dp[0][i] = 1;
    int score = 0, fir = 0, sec = 1;
    for (int i = 1; i <= n; i++) {
      int u;
      scanf("%d", &u);
      score += u;
      for (int j = 0; j <= i - 1; j++) dp[sec][j] = 0;
      for (int j = i; j <= n * m; j++) {
        double tt = QQ(fir, j - 1) - QQ(fir, j - m - 1) -
                    (QQ(fir, j - u) - QQ(fir, j - u - 1));
        dp[sec][j] = dp[sec][j - 1] + tt * 1.0 / (m - 1);
      }
      fir ^= 1, sec ^= 1;
    }
    if (m == 1) {
      puts("1");
      continue;
    }
    double res = dp[fir][score - 1];
    res = res * (m - 1) + 1;
    printf("%.12lf\n", res);
  }
  return 0;
}
