#include using namespace std; #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) template bool chmin(T1 &a, T2 b) { return b < a && (a = b, true); } template bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } typedef long long ll; typedef double D; typedef complex P; const D eps = 0; D dot(P a, P b) { return real(conj(a) * b); } D cross(P a, P b) { return imag(conj(a) * b); } vector

convexfull(vector

&ps) { auto comp = [](P a, P b) { if (a.real() != b.real()) return a.real() < b.real(); return a.imag() < b.imag(); }; int n = ps.size(); sort(ps.begin(), ps.end(), comp); int k = 0; vector

qs(n * 2); for (int i = 0; i < n; i++) { while (k > 1 && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) <= 0) k--; qs[k++] = ps[i]; } for (int i = n - 2, t = k; i >= 0; i--) { while (k > t && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) <= 0) k--; qs[k++] = ps[i]; } qs.resize(k - 1); return qs; } double farthest(vector

&ps) { auto qs = convexfull(ps); int n = qs.size(); if (n == 2) return abs(qs[0] - qs[1]); auto comp = [](P a, P b) { if (a.real() != b.real()) return a.real() < b.real(); return a.imag() < b.imag(); }; int i = 0, j = 0; for (int k = 0; k < n; k++) { if (!comp(qs[i], qs[k])) i = k; if (comp(qs[j], qs[k])) j = k; } double ret = 0; int si = i, sj = j; while (i != sj || j != si) { ret = max(ret, abs(qs[i] - qs[j])); if (cross(qs[(i + 1) % n] - qs[i], qs[(j + 1) % n] - qs[j]) < 0) { i = (i + 1) % n; } else { j = (j + 1) % n; } } return ret; } struct UnionFind { vector parent, size; UnionFind(int n) : parent(n), size(n, 1) { for (int i = 0; i < n; i++) parent[i] = i; } int operator[](int x) { return parent[x] == x ? x : (parent[x] = operator[](parent[x])); } bool merge(int x, int y) { if ((x = operator[](x)) == (y = operator[](y))) return false; parent[x] = parent[y] = size[x] > size[y] ? parent[x] : parent[y]; size[x] = size[y] = size[x] + size[y]; return true; } }; ll hypot2(ll x, ll y) { return x * x + y * y; } int main() { int n; cin >> n; UnionFind uf(n); if (n == 0) { cout << 1 << endl; return 0; } else if (n == 1) { cout << 2 << endl; return 0; } vector x(n); vector y(n); rep(i, n) scanf("%lld %lld", &x[i], &y[i]); rep(i, n - 1) { if (hypot2(x[i + 1] - x[i], y[i + 1] - y[i]) <= 100) uf.merge(i, i + 1); } vector> ps(n); rep(i, n) ps[uf[i]].emplace_back(x[i], y[i]); double ans = 0; rep(i, n) if (!ps[i].empty()) chmax(ans, farthest(ps[i])); ans += 2; printf("%.20f\n", ans); return 0; }