#include <bits/stdc++.h>
using namespace std;
double prob[2][100047];
double sprob[100047];
int main() {
int N, M; cin >> N >> M;
if (M == 1) { cout << "1" << endl; return 0; }
vector<int> K(N);
int Krank = 0;
for (int &k:K) { cin >> k; Krank += k; }
prob[0][0] = 1;
for (int n=0; n<N; ++n) {
int prev=n&1, curr=1-prev;
sprob[0]=0;
for (int i=0; i<=Krank; ++i) sprob[i+1] = sprob[i] + prob[prev][i];
for (int i=0; i<=Krank; ++i) {
prob[curr][i] = sprob[i] - (i-M >= 0 ? sprob[i-M] : 0) - (i-K[n] >= 0 ? prob[prev][i-K[n]] : 0);
prob[curr][i] /= M-1;
}
}
double better = 0;
for (int i=1; i<Krank; ++i) better += prob[N&1][i];
better *= M-1;
cout << fixed << setprecision(15) << (better+1) << endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpkb3VibGUgcHJvYlsyXVsxMDAwNDddOwpkb3VibGUgc3Byb2JbMTAwMDQ3XTsKCmludCBtYWluKCkgewogICAgaW50IE4sIE07IGNpbiA+PiBOID4+IE07CiAgICBpZiAoTSA9PSAxKSB7IGNvdXQgPDwgIjEiIDw8IGVuZGw7IHJldHVybiAwOyB9CiAgICB2ZWN0b3I8aW50PiBLKE4pOwogICAgaW50IEtyYW5rID0gMDsKICAgIGZvciAoaW50ICZrOkspIHsgY2luID4+IGs7IEtyYW5rICs9IGs7IH0KICAgIHByb2JbMF1bMF0gPSAxOwogICAgZm9yIChpbnQgbj0wOyBuPE47ICsrbikgewogICAgICAgIGludCBwcmV2PW4mMSwgY3Vycj0xLXByZXY7CiAgICAgICAgc3Byb2JbMF09MDsKICAgICAgICBmb3IgKGludCBpPTA7IGk8PUtyYW5rOyArK2kpIHNwcm9iW2krMV0gPSBzcHJvYltpXSArIHByb2JbcHJldl1baV07CiAgICAgICAgZm9yIChpbnQgaT0wOyBpPD1LcmFuazsgKytpKSB7CiAgICAgICAgICAgIHByb2JbY3Vycl1baV0gPSBzcHJvYltpXSAtIChpLU0gPj0gMCA/IHNwcm9iW2ktTV0gOiAwKSAtIChpLUtbbl0gPj0gMCA/IHByb2JbcHJldl1baS1LW25dXSA6IDApOwogICAgICAgICAgICBwcm9iW2N1cnJdW2ldIC89IE0tMTsKICAgICAgICB9CiAgICB9CiAgICBkb3VibGUgYmV0dGVyID0gMDsKICAgIGZvciAoaW50IGk9MTsgaTxLcmFuazsgKytpKSBiZXR0ZXIgKz0gcHJvYltOJjFdW2ldOwogICAgYmV0dGVyICo9IE0tMTsKICAgIGNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDE1KSA8PCAoYmV0dGVyKzEpIDw8IGVuZGw7Cn0=