#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + (s - '0');
    s = getchar();
  }
  return x * f;
}
const int jzm = 998244353;
inline int ABS(int x) { return x < 0 ? -x : x; }
int n, m, i, j, s, o, k;
double x[2505], y[2505];
inline double dis(double a, double b, double s, double o) {
  return sqrt((a - s) * (a - s) + (b - o) * (b - o));
}
double dp[2505][2505][2];
int ll(int x) { return x - 1 < 1 ? n : x - 1; }
int rr(int x) { return x % n + 1; }
double DIS(int a, int b) { return dis(x[a], y[a], x[b], y[b]); }
double DP(int l, int r, int f) {
  if (l == r) return 0.0;
  if (dp[l][r][f] >= 0.0) return dp[l][r][f];
  if (l == ll(r)) return dp[l][r][f] = dis(x[l], y[l], x[r], y[r]);
  if (!f) {
    dp[l][r][f] =
        max(DP(rr(l), r, 0) + DIS(l, rr(l)), DP(rr(l), r, 1) + DIS(l, r));
  } else
    dp[l][r][f] =
        max(DP(l, ll(r), 1) + DIS(ll(r), r), DP(l, ll(r), 0) + DIS(l, r));
  return dp[l][r][f];
}
int main() {
  n = read();
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= n; i++) {
    x[i] = (double)read();
    y[i] = (double)read();
  }
  double ans = 0.0;
  int l = 0, r = n - 1;
  for (int i = 1; i <= n; i++) {
    l = rr(l);
    r = rr(r);
    ans = max(ans, max(DP(l, r, 0), DP(l, r, 1)));
  }
  printf("%.10lf\n", ans);
  return 0;
}
