#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
double ans, f1[2505][2505], f2[2505][2505];
int n;
pair<double, double> p[2505];
double dist(int i, int j) {
  return sqrt((p[i].first - p[j].first) * (p[i].first - p[j].first) +
              (p[i].second - p[j].second) * (p[i].second - p[j].second));
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (int t = 1; t <= n - 1; t++) {
    for (int i = 0; i < n; i++) {
      int j = (i + t) % n;
      f1[i][j] = max(f1[(i + 1) % n][j] + dist(i, (i + 1) % n),
                     f2[(i + 1) % n][j] + dist(i, j));
      f2[i][j] = max(f2[i][(j + n - 1) % n] + dist((j + n - 1) % n, j),
                     f1[i][(j + n - 1) % n] + dist(i, j));
      ans = max(ans, f1[i][j]);
      ans = max(ans, f2[i][j]);
    }
  }
  cout << fixed << setprecision(15) << ans;
  return 0;
}
