#include <bits/stdc++.h>
using namespace std;
long double dp[2][100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m == 1) {
    cout << 1 << endl;
    return 0;
  }
  int now = 0, pre = 1;
  dp[now][0] = m - 1;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x), sum += x;
    swap(now, pre);
    memset(dp[now], 0, sizeof(dp[now]));
    for (int j = 0; j <= i * m; j++) {
      dp[now][j + 1] += dp[pre][j] / (m - 1),
          dp[now][j + m + 1] -= dp[pre][j] / (m - 1);
      dp[now][j + x] -= dp[pre][j] / (m - 1),
          dp[now][j + x + 1] += dp[pre][j] / (m - 1);
    }
    for (int j = 0; j <= (i + 1) * m; j++) {
      if (j) dp[now][j] += dp[now][j - 1];
    }
  }
  long double ans = 1;
  for (int i = 0; i < sum; i++) {
    ans += dp[now][i];
  }
  printf("%.16f\n", (double)ans);
  return 0;
}
