#include <iostream>
#include <iomanip>
#include <vector>

using namespace std;

int main() {
    int N, M;
    cin >> N >> M;

    // Read the favorite burgers of all people
    vector<int> fav(N);
    for (int i = 0; i < N; ++i) {
        cin >> fav[i];
    }

    int joshFav = fav[N-1];  // Josh's favorite burger (the last person's favorite)

    // Count how many people before Josh have the same favorite burger as Josh
    int countJoshFavBefore = 0;
    for (int i = 0; i < N - 1; ++i) {
        if (fav[i] == joshFav) {
            countJoshFavBefore++;
        }
    }

    // Initial probability that Josh's burger survives the coach's pick
    double probability = 1.0;
    probability *= (double)(M - 1) / M; // Chance that the coach doesn't pick Josh's burger

    // There are M-1 burgers left after the coach picks
    int remainingBurgers = M - 1;

    // For every person who shares Josh's favorite burger, update the probability
    for (int i = 0; i < N - 1; ++i) {
        if (fav[i] == joshFav) {
            probability *= (double)(remainingBurgers - 1) / remainingBurgers;
            remainingBurgers--;
        } else {
            // If they don't care about Josh's burger, just reduce the number of burgers left
            remainingBurgers--;
        }
    }

    // Output the final probability with six decimal precision
    cout << fixed << setprecision(6) << probability << endl;

    return 0;
}
