#include <bits/stdc++.h>
using namespace std;
const int maxn = 2555;
int n;
double dp[maxn][maxn][2], dist[maxn][maxn], x[maxn], y[maxn];
inline int pre(int x) { return (x + n - 1) % n; }
inline int nxt(int x) { return (x + 1) % n; }
inline void getdist(int i, int j) {
  dist[i][j] =
      sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
}
double dfs(int i, int j, int ty) {
  if (dp[i][j][ty] >= 0) return dp[i][j][ty];
  int now = !ty ? i : j, _pre = pre(i), _nxt = nxt(j);
  if (_pre == j) return 0;
  return dp[i][j][ty] = max(dfs(_pre, j, 0) + dist[_pre][now],
                            dfs(i, _nxt, 1) + dist[now][_nxt]);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%lf%lf", &x[i], &y[i]);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) getdist(i, j);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      for (int k = 0; k < 2; ++k) dp[i][j][k] = -1;
  double res = 0;
  for (int i = 0; i < n; ++i) res = max(res, dfs(i, i, 0));
  printf("%.12f\n", res);
  return 0;
}
