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