#include <bits/stdc++.h>
using namespace std;
const int nn = 2505;
struct Point {
  double x, y;
};
Point pnt[nn];
int n, rht;
double dp[nn][nn][2], ans;
inline double find_dist(int a, int b) {
  return sqrt((pnt[a].x - pnt[b].x) * (pnt[a].x - pnt[b].x) +
              (pnt[a].y - pnt[b].y) * (pnt[a].y - pnt[b].y));
}
int main() {
  scanf("%d", &n);
  for (register int i = 0; i < n; i++) {
    scanf("%lf%lf", &pnt[i].x, &pnt[i].y);
  }
  for (register int i = 2; i <= n; i++) {
    for (register int lft = 0; lft < n; lft++) {
      rht = (lft + i - 1) % n;
      dp[lft][rht][0] =
          (dp[(lft + 1) % n][rht][0] + find_dist(lft, (lft + 1) % n) >
                   dp[(lft + 1) % n][rht][1] + find_dist(lft, rht)
               ? dp[(lft + 1) % n][rht][0] + find_dist(lft, (lft + 1) % n)
               : dp[(lft + 1) % n][rht][1] + find_dist(lft, rht));
      dp[lft][rht][1] =
          (dp[lft][(rht - 1 + n) % n][0] + find_dist(rht, lft) >
                   dp[lft][(rht - 1 + n) % n][1] +
                       find_dist(rht, (rht - 1 + n) % n)
               ? dp[lft][(rht - 1 + n) % n][0] + find_dist(rht, lft)
               : dp[lft][(rht - 1 + n) % n][1] +
                     find_dist(rht, (rht - 1 + n) % n));
    }
  }
  for (register int i = 0; i < n; i++) {
    ans = (ans > dp[i][(i - 1 + n) % n][0] ? ans : dp[i][(i - 1 + n) % n][0]);
    ans = (ans > dp[i][(i - 1 + n) % n][1] ? ans : dp[i][(i - 1 + n) % n][1]);
  }
  printf("%0.10lf\n", ans);
  return 0;
}
