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