#include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <typename T>
using V = vector<T>;
template <typename T, typename S>
using P = pair<T, S>;
template <class T>
using min_heap = priority_queue<T, std::vector<T>, std::greater<T>>;
using LD = long double;
template <typename T, typename S>
void check(T& a, S& b) {
  if (a >= b) {
    a %= b;
  }
}
template <typename T>
T gcd(T u, T v) {
  if (u == v) return u;
  if (u == 0) return v;
  if (v == 0) return u;
  if (~u & 1) {
    if (v & 1)
      return gcd(u >> 1, v);
    else
      return gcd(u >> 1, v >> 1) << 1;
  }
  if (~v & 1) return gcd(u, v >> 1);
  if (u > v) return gcd((u - v) >> 1, v);
  return gcd((v - u) >> 1, u);
}
const int N = 2501;
long double dp[N][N][2];
int vis[N][N][2];
LL sqr(LL a) { return a * a; }
long double dist(P<int, int>& a, P<int, int>& b) {
  return sqrt(sqr(a.first - b.first) + sqr(a.second - b.second));
}
V<P<int, int>> points;
int n;
long double solve(int i, int j, int k) {
  auto& Vis = vis[i][j][k];
  if (Vis) return dp[i][j][k];
  Vis = 1;
  auto& ans = dp[i][j][k] = 0;
  int next, prev;
  if (!k) {
    next = (i + 1) % n, prev = (j - 1 + n) % n;
  } else {
    next = (i - 1 + n) % n, prev = (j + 1) % n;
  }
  return (next == j
              ? 0
              : ans =
                    max(solve(next, j, k) + dist(points[next], points[i]),
                        solve(prev, i, k ^ 1) + dist(points[prev], points[i])));
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cerr.tie(NULL);
  ;
  cout << fixed << setprecision(10);
  cerr << fixed << setprecision(10);
  cin >> n;
  points.resize(n);
  for (int i = 0; i < (int)n; i++) {
    cin >> points[i].first >> points[i].second;
  }
  long double ans = 0;
  for (int i = 0; i < (int)n; i++) {
    ans = max(ans,
              solve((i + 1) % n, i, 0) + dist(points[i], points[(i + 1) % n]));
    ans = max(ans,
              solve(i, (i + 1) % n, 1) + dist(points[i], points[(i + 1) % n]));
  }
  cout << ans << '\n';
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
