#include <bits/stdc++.h>
using namespace std;
const int N = 2510;
int a[N], b[N];
double dp[2][N][N];
double sqr(double x) { return x * x; }
double dist(int x, int y) { return sqrt(sqr(a[x] - a[y]) + sqr(b[x] - b[y])); }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
  for (int dis = 1; dis < n; dis++) {
    for (int i = 0; i < n; i++) {
      int j = (i + dis) % n;
      dp[0][i][j] = max(dp[0][(i + 1) % n][j] + dist(i, (i + 1) % n),
                        dp[1][(i + 1) % n][j] + dist(i, j));
      dp[1][i][j] = max(dp[1][i][(j - 1 + n) % n] + dist((j - 1 + n) % n, j),
                        dp[0][i][(j - 1 + n) % n] + dist(i, j));
    }
  }
  double ans = 0;
  for (int i = 0; i < n; i++)
    ans = max(ans, max(dp[0][i][(i + n - 1) % n], dp[1][i][(i + n - 1) % n]));
  printf("%.20lf\n", ans);
  return 0;
}
