#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2510;
long long n, x[MAXN], y[MAXN];
long double dp[2][MAXN][MAXN], answer;
long double dist(int i, int j) {
  return sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < n; j++) {
      dp[0][i][j] = max(dp[0][i - 1][(j + 1) % n] + dist(j, (j + 1) % n),
                        dp[1][i - 1][(i + j) % n] + dist(j, (j + i) % n));
      dp[1][i][j] =
          max(dp[1][i - 1][(j - 1 + n) % n] + dist(j, (j - 1 + n) % n),
              dp[0][i - 1][(j - i + n) % n] + dist(j, (j - i + n) % n));
      answer = max(answer, dp[0][i][j]);
      answer = max(answer, dp[1][i][j]);
    }
  }
  cout << fixed << setprecision(10) << answer << endl;
  return 0;
}
