#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2525;
int n;
long double dp[MAXN][MAXN][2];
int x[MAXN], y[MAXN];
long double sqr(long double x) { return x * x; }
long double dist(int i, int j) {
  return sqrtl(sqr(x[i] - x[j]) + sqr(y[i] - y[j]));
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  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][1] + dist(i, j),
                        dp[(i + 1) % n][j][0] + dist(i, (i + 1) % n));
      dp[i][j][1] = max(dp[i][(j + n - 1) % n][1] + dist(j, (j + n - 1) % n),
                        dp[i][(j + n - 1) % n][0] + dist(j, i));
    }
  }
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    ans = max(ans, max(dp[i][(i + n - 1) % n][0], dp[i][(i + n - 1) % n][1]));
  }
  cout << fixed << setprecision(10) << ans;
}
