#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110;
const int MAXM = 1010;
int n, m, p[MAXN], my_sum;
double dp[MAXN][MAXN * MAXM];
double t[MAXN][MAXN * MAXM];
int main(void) {
  scanf("%d %d", &n, &m);
  for (int i = (0); i < (n); ++i) {
    scanf("%d", &p[i]);
    --p[i];
    my_sum += p[i];
  }
  if (m == 1) {
    printf("1\n");
    return 0;
  }
  for (int sum = n * m; sum >= 0; --sum) {
    dp[n & 1][sum] = (sum < my_sum) ? 1 : 0;
    t[n & 1][sum] = t[n & 1][sum + 1] + dp[n & 1][sum];
  }
  for (int i = n - 1; i >= 0; --i) {
    for (int sum = n * m; sum >= 0; --sum) {
      dp[i & 1][sum] = t[(i + 1) & 1][sum] - t[(i + 1) & 1][sum + m];
      dp[i & 1][sum] -= dp[(i + 1) & 1][sum + p[i]];
      dp[i & 1][sum] /= m - 1;
      t[i & 1][sum] = t[i & 1][sum + 1] + dp[i & 1][sum];
    }
  }
  printf("%.10lf\n", (dp[0][0] * (m - 1)) + 1);
  return 0;
}
