#include <bits/stdc++.h>
using namespace std;
int a[105], n, m;
double dp[2][100005];
int main(void) {
  int i, j;
  while (~scanf("%d%d", &n, &m)) {
    int sum = 0;
    for (i = 1; i <= n; i++) scanf("%d", &a[i]), sum += a[i];
    if (m == 1) {
      printf("%.15f\n", 1.0);
      continue;
    }
    memset(dp, 0, sizeof(dp));
    int e = 1;
    dp[e][0] = 1.0;
    for (i = 1; i <= n; i++) {
      e = 1 - e;
      memset(dp[e], 0, sizeof(dp[e]));
      double temp = 0.0;
      for (j = 1; j <= n * m; j++) {
        temp += dp[1 - e][j - 1];
        if (j > m) temp -= dp[1 - e][j - m - 1];
        if (j >= a[i])
          dp[e][j] = (temp - dp[1 - e][j - a[i]]) / (m - 1);
        else
          dp[e][j] = temp / (m - 1);
      }
    }
    double ans = 0.0;
    for (i = 0; i < sum; i++) {
      ans += dp[e][i];
    }
    printf("%.15f\n", 1 + ans * (m - 1));
  }
  return 0;
}
