#include<bits/stdc++.h>
using namespace std; 
typedef long long ll;
typedef long double ld;
#define pb push_back
#define fi first
#define se second
const ll mod = 1e9+7;
const int N = 2e5+6;
int bit[55][55];
void add(int x, int y){
	for(int i=x;i>0;i-=(i&-i)){
		for(int j=y;j>0;j-=(j&-j)){
			bit[i][j]++;
		}
	}
}
ll get(int x, int y){
	ll ret =0;
	for(int i=x;i<55;i+=(i&-i)){
		for(int j=y;j<55;j+=(j&-j)){
			ret+=bit[i][j];
		}
	}
	return ret;
}
ll get2(ll x){
	ll ret = 1;
	while(x%2==0){
		ret++;
		x/=2;
	}
	return ret;
}
ll get5(ll x){
	ll ret = 1;
	while(x%5==0){
		ret++;
		x/=5;
	}
	return ret;
}
void solve(){
	int n; 
	cin>>n;
	ll ans = 0; 
	for(int i=1;i<=n;i++){
		ld inp; 
		cin>>inp; 
		ll trt = llround(inp*1e9);
		ll x = get2(trt);
		ll y = get5(trt);
		ll xp = max(1ll,20-x);
		ll yp = max(1ll,20-y);
		ans+=get(xp,yp);
		add(x,y);
	}
	cout<<ans<<endl;
}
int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	int t=1; 
//	cin>>t; 
	while(t--){
		solve();
	}
	return 0;
}

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <math.h>

unsigned int factorial(unsigned int n){
    if (n==0) return 1;
    else return n*factorial(n-1);
}

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define ll long long
using namespace std;

int main(){
    int n;
    cin>>n;

    vector<pair<int,int>> xy(n);
    vector<int> a(n);
    for(int i=0;i<n;i++) {
        cin>>xy[i].first>>xy[i].second;
        a[i]=i;
    }

    double l_sum=0;

    do{
        for(int i=0;i<n-1;i++){
            l_sum+=sqrt(pow(xy[a[i]].first-xy[a[i+1]].first,2)+pow(xy[a[i]].second-xy[a[i+1]].second,2));
        }
    }while(next_permutation(a.begin(),a.end()));

    cout<<fixed<<setprecision(10)<<l_sum/(double) factorial(n)<<endl;

    return 0;
}