#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    double x[n];
    double y[n];
    for(int i=0;i<n;i++)cin >> x[i] >> y[i];
    vector<int>v(n);
    for(int i=0;i<n;i++)v[i] = i;
    double summ = 0.0;
    double cnt = 0;
    do{
        cnt+=1.0;
        for(int i=0;i<n-1;i++){
            summ += sqrt((x[v[i]]-x[v[i+1]])*(x[v[i]]-x[v[i+1]]) + (y[v[i]]-y[v[i+1]])*(y[v[i]]-y[v[i+1]]));
        }
    }while(next_permutation(v.begin(),v.end()));

    printf("%.10lf", summ/cnt);
}
#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(){

    int n, m;
    cin >> n >> m;

    int l[m], r[m];
    for(int i=0; i<m; i++){
        cin >> l[i] >> r[i];
    }

    int l_prime = *max_element(l, l+m);
    int r_prime = *min_element(r, r+m);

    if(l_prime > r_prime){
        cout << '0' << endl;
        return 0;
    }

    cout << r_prime - l_prime + 1 << endl;

    return 0;
}