#include<bits/stdc++.h>
using namespace std;
typedef struct node {
	double x;
	double y;
}Node;
double distance(Node a, Node b)
{
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void solve()
{
	int n; cin >> n;
	vector<Node>a(n+1);
	double ans = 0.0;
	for (int i = 1; i <= n; i++)
	{
		cin>>a[i].x>>a[i].y;
	}
	for (int i = 2; i <= n; i++)
	{
		double e = distance(a[i - 1], a[i]);
		double k = log(e * log(2.0)) / log(2.0);
		//判断k为负数时的情况,即两个点很接近时
		k=max(0.0,k);
		ans = ans + (double)(2 * k + (2 * e) / pow(2.0, k));
	}
	cout << fixed << setprecision(6) << ans;
}

int main()
{
	solve();
	return 0;
}