#include <bits/stdc++.h>
using namespace std;
int n;
double dp[2505][2505], x[2505], y[2505], ans, dp1[2505][2505];
double dis(int i, int j) {
  return sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lf%lf", &x[i], &y[i]);
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int k = (i + j) % n;
      dp[j][k] = max(dp[(j + 1) % n][k] + dis(j, (j + 1) % n),
                     dp1[(j + 1) % n][k] + dis(k, j));
      dp1[j][k] = max(dp1[j][(k - 1 + n) % n] + dis(k, (k - 1 + n) % n),
                      dp[j][(k - 1 + n) % n] + dis(k, j));
    }
  }
  for (int i = 0; i < n; i++)
    ans = max(ans, max(dp[i][(i + n - 1) % n], dp1[i][(i + n - 1) % n]));
  printf("%.10lf", ans);
}
