#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y;
} a[3000];
double pw(double x) { return x * x; }
double dist(node a, node b) { return sqrt(pw(a.x - b.x) + pw(a.y - b.y)); }
double f[2][3000], g[2][3000];
int main() {
  int n;
  scanf("%d", &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] + dist(a[i], a[(i + 1) % n]),
              g[(j - 1) % 2][(i + j) % n] + dist(a[i], a[(i + j) % n]));
      g[j % 2][i] =
          max(g[(j - 1) % 2][(i - 1 + n) % n] + dist(a[i], a[(i - 1 + n) % n]),
              f[(j - 1) % 2][(i - j + n) % n] + dist(a[i], a[(i - j + n) % n]));
    }
  double ans = 0;
  for (int i = 0; i < n; i++)
    ans = max(ans, max(f[(n - 1) % 2][i], g[(n - 1) % 2][i]));
  printf("%.10f\n", ans);
  return 0;
}
