#include <bits/stdc++.h>
using namespace std;
double dp1[2][3005], dp2[2][3005];
struct Point {
  double x, y;
} a[3005];
double dis(Point x, Point y) {
  return sqrt((x.x - y.x) * (x.x - y.x) + (x.y - y.y) * (x.y - y.y));
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (register int i = 0; i < n; ++i) {
    cin >> a[i].x >> a[i].y;
  }
  for (register int j = 1; j < n; ++j) {
    for (register int i = 0; i < n; ++i) {
      dp1[j & 1][i] =
          max(dp1[(j - 1) & 1][(i + 1) % n] + dis(a[i], a[(i + 1) % n]),
              dp2[(j - 1) & 1][(i + j) % n] + dis(a[i], a[(i + j) % n]));
      dp2[j & 1][i] = max(
          dp2[(j - 1) & 1][(i - 1 + n) % n] + dis(a[i], a[(i - 1 + n) % n]),
          dp1[(j - 1) & 1][(i - j + n) % n] + dis(a[i], a[(i - j + n) % n]));
    }
  }
  double ans = 0;
  for (register int i = 0; i < n; ++i) {
    ans = max(ans, max(dp1[(n - 1) & 1][i], dp2[(n - 1) & 1][i]));
  }
  printf("%.10lf", ans);
  return 0;
}
