#include<iostream>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
using i64 = long long;
using vec = pair<i64, i64>;
#define x first
#define y second
vec operator+(vec a, vec b) {
return {a.x + b.x, a.y + b.y};
}
vec operator-(vec v) {
return {-v.x, -v.y};
}
vec operator-(vec a, vec b) {
return a + -b;
}
double mod(vec v) {
return hypot(v.x, v.y);
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cout << fixed << setprecision(12);
int n;
cin >> n;
vector<vec> p(n + 1);
for (int i = 1; i <= n; ++i)
cin >> p[i].x >> p[i].y;
vector<double> ans(n + 1);
for (int i = 1; i <= n; i++)
{
ans[i] = ans[i - 1];
for (int j = 1; j < i; ++j)
ans[i] = max(ans[i], ans[j - 1] + mod(p[i] - p[j]));
}
cout << ans[n] << endl;
}