#include <bits/stdc++.h>
using namespace std;
int n;
double dp[2505][2505][2], ans;
pair<double, double> a[2505];
double operator*(const pair<double, double> &a, const pair<double, double> &b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  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][0] + a[(i + 1) % n] * a[i],
                        dp[(i + 1) % n][j][1] + a[j] * a[i]);
      dp[i][j][1] = max(dp[i][(j - 1 + n) % n][0] + a[i] * a[j],
                        dp[i][(j - 1 + n) % n][1] + a[(j - 1 + n) % n] * a[j]);
    }
  }
  for (int i = 0; i < n; i++)
    ans = max(ans, max(dp[i][(i - 1 + n) % n][0], dp[i][(i - 1 + n) % n][1]));
  printf("%.13lf", ans);
  return 0;
}
