#include <bits/stdc++.h>
const int NMAX = 2509;
using namespace std;
double dp[NMAX][NMAX][2];
double x[NMAX], y[NMAX];
double r(int v, int u) {
  return sqrt((x[v] - x[u]) * (x[v] - x[u]) + (y[v] - y[u]) * (y[v] - y[u]));
}
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.precision(30);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i < n; i++) {
    for (int l = 0; l < n; l++) {
      dp[l][(l + i) % n][0] =
          max(dp[(l + 1) % n][(l + i) % n][0] + r(l, (l + 1) % n),
              dp[(l + 1) % n][(l + i) % n][1] + r(l, (l + i) % n));
      dp[l][(l + i) % n][1] =
          max(dp[l][(l + i - 1) % n][1] + r((l + i) % n, (l + i - 1) % n),
              dp[l][(l + i - 1) % n][0] + r(l, (l + i) % n));
    }
  }
  double ans = 0;
  for (int i = 0; i < n; i++) {
    for (int q = 0; q <= 1; q++) ans = max(ans, dp[i][(i - 1 + n) % n][q]);
  }
  cout << ans;
  return 0;
};
