#include <bits/stdc++.h>
using namespace std;
const int N = 3010;
int n;
double f[N][N][2];
struct Point {
  double x, y;
} a[N];
double dis(Point a, Point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lf%lf", &a[i].x, &a[i].y);
  for (int len = 2; len <= n; len++) {
    for (int i = 0; i < n; i++) {
      int j = (i + len - 1) % n;
      f[i][j][0] = max(f[(i + 1) % n][j][0] + dis(a[i], a[(i + 1) % n]),
                       f[(i + 1) % n][j][1] + dis(a[i], a[j]));
      f[i][j][1] =
          max(f[i][(j - 1 + n) % n][0] + dis(a[j], a[i]),
              f[i][(j - 1 + n) % n][1] + dis(a[j], a[(j - 1 + n) % n]));
    }
  }
  double ans = 0;
  for (int i = 0; i < n; i++)
    ans = max(ans, max(f[i][(i + n - 1) % n][0], f[i][(i + n - 1) % n][1]));
  printf("%.10lf\n", ans);
  return 0;
}
