#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
  node() {}
  node(int X, int Y) { x = X, y = Y; }
} s[2505];
int n;
double dp[2505][2505][2];
double dis(node u, node v) {
  return sqrt(1.0 * (u.x - v.x) * (u.x - v.x) +
              1.0 * (u.y - v.y) * (u.y - v.y));
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &s[i].x, &s[i].y);
  for (int len = 2; len <= n; len++)
    for (int i = 0; i < n; i++) {
      int j = (i + len - 1) % n;
      dp[i][j][0] = max(dp[(i + 1) % n][j][0] + dis(s[i], s[(i + 1) % n]),
                        dp[(i + 1) % n][j][1] + dis(s[i], s[j]));
      dp[i][j][1] =
          max(dp[i][(j - 1 + n) % n][0] + dis(s[i], s[j]),
              dp[i][(j - 1 + n) % n][1] + dis(s[(j - 1 + n) % n], s[j]));
    }
  double ans = 0;
  for (int i = 0; i < n; i++)
    ans = max(ans, max(dp[i][(i - 1 + n) % n][0], dp[i][(i - 1 + n) % n][1]));
  printf("%.10f", ans);
  return 0;
}
