#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FORI(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
 
#define ll long long
#define mp(m, n) make_pair((m), (n))
// #define DEBUG
 
#ifdef DEBUG
template<typename T>
void _debug(string s, T x) {
    cerr << s << ":";
    for (auto it = x.begin(); it != x.end(); ++it) {
        cerr << " " << *it;
    }
    cerr << endl;
}
 
template<typename T, typename K>
void _debug(string s, map<T, K> x) {
    cerr << s << ":";
    for (auto it = x.begin(); it != x.end(); ++it) {
        cerr << " " << it->first << ":" << it->second;
    }
    cerr << endl;
}

template<typename T, typename K>
void _debug(string s, set<T, K> x) {
    cerr << s << ":";
    for (auto it = x.begin(); it != x.end(); ++it) {
        cerr << " " << *it;
    }
    cerr << endl;
}
 
template<typename T, typename K>
void _debug(string s, vector<pair<T, K> > x) {
    cerr << s << ":";
    for (auto it = x.begin(); it != x.end(); ++it) {
        cerr << " " << it->first << "," << it->second;
    }
    cerr << endl;
}

void _debug(string s, int x) {
    cerr << s << ": " << x << endl;
}
void _debug(string s, long long x) {
    cerr << s << ": " << x << endl;
}
void _debug(string s, double x) {
    cerr << s << ": " << x << endl;
}
void _debug(string s, string x) {
    cerr << s << ": " << x << endl;
}
void _debug(string s, char x) {
    cerr << s << ": " << x << endl;
}

#define debug(x) _debug(#x, (x))
#else
#define debug(x)
#endif
 
#define db debug

int count(vector<string> &m, int index) {
    vector<int> vis(m.size());
    queue<int> q;
    q.push(index);
    vis[index] = 1;
    while(q.size()) {
        int x = q.front();
        q.pop();
        for (int i = 0; i < m.size(); i++) {
            if (m[i][x] == '1' && vis[i] == 0) {
                vis[i] = 1;
                q.push(i);
            }
        }
    }
    return std::accumulate(vis.begin(), vis.end(), 0);
}

int main() {
    ios_base::sync_with_stdio(false); std::cin.tie(0);
    int n;
    cin >> n;
    vector<string> v(n);
    FOR(i, n) cin >> v[i];
    double R = 0;
    FOR(i, n) {
        int t = count(v, i);
        debug(t);
        R += 1.0 / t;
    }
    cout << setprecision(15) << R << endl;
    
}
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)
#define bit(n,k) ((n>>k)&1) //nのk　bit目
#define vec(T) vector<T>
#define vvec(T) vector<vector<T>>
using ll = long long;
using P = pair<int,int>;


template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll llINF = 1LL << 60;
const int iINF = 1e9;

//------------------------------------------------


struct Solver{

    void solve(){
        int N;
        ll X;
        cin >> N >> X;

        vec(ll) A(N),B(N);
        rep(i,N) cin >> A[i];
        rep(i,N-1) B[i]=A[i+1]/A[i];
        B[N-1] = llINF;


        vector<map<ll,ll>> dp(N+1);

        dp[N][-X]=1;

        for(int i=N-1; i>=0 ; i--){
            for(auto p:dp[i+1]){
                //cout << "i=" << i << "," <<p.first << ","<<p.second<<endl;
                ll di = p.first;
                ll num,a,b;
                num=-A[i]-di;
                if(num%A[i]==0) a = num/A[i]+1;
                else{
                    if(num>0) a = num/A[i]+1;
                    else a = num/A[i];
                }
                if(abs(a) < B[i]) dp[i][di+a*A[i]] += p.second;

                num=A[i]-di;
                if(num%A[i]==0) b = num/A[i]-1;
                else{
                    if(num>0) b = num/A[i];
                    else b = num/A[i]-1;
                }
                if(abs(b) < B[i] && b>a ) dp[i][di+b*A[i]] += p.second;

            }
        }
        cout << dp[0][0] << endl;
    }
};


int main(){
    int testcasenum=1;
    //cin >> testcasenum;
    rep1(ti,testcasenum){
        Solver solver;
        solver.solve();
    }
    return 0;
}