#include <bits/stdc++.h>
using namespace std;
const long long max4 = 10004;
const long long maxx = 2505;
const long long max6 = 1000006;
const long long max7 = 10000007;
const long long lg4 = 13;
const long long lg5 = 17;
const long long lg6 = 20;
const long long INF = 2LL * 1000000000;
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
  }
  return res;
}
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long t = a % b;
    a = b, b = t;
  }
  return a;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long is_prime(long long n) {
  if (n <= 1 || n > 3 && (n % 2 == 0 || n % 3 == 0)) return 0;
  for (long long i = 5, t = 2; i * i <= n; i += t, t = 6 - t)
    if (n % i == 0) return 0;
  return 1;
}
long long x[maxx], y[maxx];
long double dp[maxx][maxx][2];
long double dis(long long x1, long long y1, long long x2, long long y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  ;
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> x[i] >> y[i];
  long double res = 0.0;
  for (long long len = 1; len <= n - 1; len++)
    for (long long i = 1; i <= n; i++) {
      long long j = (i + len) % n;
      if (j == 0) j = n;
      if (len == 1) {
        dp[i][j][0] = dp[i][j][1] = dis(x[i], y[i], x[j], y[j]);
        continue;
      }
      long long ii = (i + 1) % n, jj = (j + n - 1) % n;
      if (ii == 0) ii = n;
      if (jj == 0) jj = n;
      dp[i][j][0] = max(dis(x[i], y[i], x[ii], y[ii]) + dp[ii][j][0],
                        dis(x[i], y[i], x[j], y[j]) + dp[ii][j][1]);
      dp[i][j][1] = max(dis(x[j], y[j], x[jj], y[jj]) + dp[i][jj][1],
                        dis(x[j], y[j], x[i], y[i]) + dp[i][jj][0]);
      if (len == n - 1) res = max(res, max(dp[i][j][0], dp[i][j][1]));
    }
  cout << fixed << setprecision(20) << res << endl;
  return 0;
}
