#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
};
double dist(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double dp[2511][2511][2];
point pt[2511];
int main() {
  int n, i, l, r;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%lf%lf", &pt[i].x, &pt[i].y);
  }
  for (i = 2; i <= n; ++i) {
    for (l = 0; l < n; ++l) {
      r = (l + i - 1) % n;
      dp[l][r][0] = max(dp[(l + 1) % n][r][0] + dist(pt[l], pt[(l + 1) % n]),
                        dp[(l + 1) % n][r][1] + dist(pt[l], pt[r]));
      dp[l][r][1] =
          max(dp[l][(r - 1 + n) % n][0] + dist(pt[l], pt[r]),
              dp[l][(r - 1 + n) % n][1] + dist(pt[r], pt[(r - 1 + n) % n]));
    }
  }
  double ans = 0.0;
  for (i = 0; i < n; ++i) {
    ans = max(ans, max(dp[i][(i + n - 1) % n][0], dp[i][(i + n - 1) % n][1]));
  }
  printf("%.10lf\n", ans);
  return 0;
}
