#include <bits/stdc++.h>
using namespace std;
const int maxn = 2509;
double f[maxn * 2][maxn][2], ans;
pair<double, double> p[maxn];
int n, r;
inline double dist(pair<double, double> a, pair<double, double> b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf%lf", &p[i].first, &p[i].second);
  for (int i = 1; i <= 2 * n - 1; i++)
    f[i][1][0] = f[i][1][1] = dist(p[(i - 1 + n) % n + 1], p[i % n + 1]);
  for (int i = 2; i <= n - 1; i++)
    for (int l = 1; l + i <= 2 * n; l++) {
      r = l + i;
      f[l][i][0] =
          max(f[l][i][0],
              f[l + 1][i - 1][0] + dist(p[(l - 1 + n) % n + 1], p[l % n + 1]));
      f[l][i][0] =
          max(f[l][i][0], f[l + 1][i - 1][1] + dist(p[(l - 1 + n) % n + 1],
                                                    p[(r - 1 + n) % n + 1]));
      f[l][i][1] =
          max(f[l][i][1], f[l][i - 1][1] + dist(p[(r - 1 + n) % n + 1],
                                                p[(r - 2 + n) % n + 1]));
      f[l][i][1] =
          max(f[l][i][1], f[l][i - 1][0] + dist(p[(l - 1 + n) % n + 1],
                                                p[(r - 1 + n) % n + 1]));
    }
  for (int i = 1; i <= n; i++)
    ans = max(ans, max(f[i][n - 1][0], f[i][n - 1][1]));
  printf("%.10lf\n", ans);
  return 0;
}
