#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

long long a[60];
long long ans;
map<long long,long long> dp[60];

long long coin(int n,long long x)
{
	long long p,q,r;

	if (dp[n][x]>0) return dp[n][x];
	p=x/a[n];
	q=x%a[n];
	if (q==0){
		dp[n][x]=1;
		return dp[n][x];
	}
	if (x>a[n+1]-a[n]) {
		dp[n][x]=coin((n-1),(x-a[n+1]+a[n]));
		return dp[n][x];
	}
	if (x<a[n]-a[n+1]) {
		dp[n][x]=coin((n-1),(x+a[n+1]-a[n]));
		return dp[n][x];
	}
	r=coin((n-1),q);
	if (x<0){
		r+=coin((n-1),(q+a[n]));
		dp[n][x]=r;
		return r;
	}
	if (x>0){
		r+=coin((n-1),(q-a[n]));
		dp[n][x]=r;
		return r;
	}
}

int main() {
	int n;
	long long x,r;

	cin >> n >> x ;
	rep(i, n) cin >> a[i] ;
	ans=0;
	n--;
	x%=a[n];
	if (x==0) {
		cout << 1 << endl;
		return 0;
	}
	ans=coin((n-1),x);
	if (x<0)ans+=coin((n-1),(x+a[n]));
	if (x>0)ans+=coin((n-1),(x-a[n]));

	cout << ans << endl;
	return 0;
}
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>

using namespace std;

using Expr = complex<double>;

int main() {
    int n, m, k;
    cin >> n >> m >> k;

    vector<bool> portal(n + 1, false);
    for (int i = 0; i < k; i += 1) {
        int pos;
        cin >> pos;
        portal[pos] = true;
    }

    vector<Expr> dp(n + 1, Expr{0, 0});
    Expr sum = dp[n];

    auto max_portals = 0;
    auto curr_portals = 0;

    for (int i = n - 1; i >= 0; i -= 1) {
        if (portal[i]) {
            dp[i] = {1, 0};
            curr_portals += 1;
            max_portals = max(max_portals, curr_portals);
        } else {
            dp[i] = Expr{0, 1} + sum / (1.0 * m);
            curr_portals = 0;
        }

        sum += dp[i];
        if (i + m <= n) {
            sum -= dp[i + m];
        }
    }

    if (max_portals >= m) {
        cout << "-1\n";
    } else {
        auto res = -dp[0].imag() / (dp[0].real() - 1.0);
        cout << fixed << setprecision(4) << res << "\n";
    }

    return 0;
}
