#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } typedef unsigned long long ull; typedef long long ll; typedef pair pii; typedef pair pll; typedef pair P; typedef pair pdi; const ll INF = 1ll<<29; const ll MOD = 1000000007; const double EPS = 1e-6; int n; double x[1000], y[1000]; double d[1000]; int main() { cin >> n; REP(i, n) scanf("%lf %lf", x + i, y + i); fill(d, d + n, 1ll<<60); priority_queue, greater > pq; pq.push(pdi(0, 0)); while (!pq.empty()) { double now = pq.top().first; int cur = pq.top().second; pq.pop(); if (!chmin(d[cur], now)) continue; REP(i, n) if (i != cur) { double nd = hypot(y[i] - y[cur], x[i] - x[cur]); if (y[i] != y[cur] || x[i] != x[cur]) nd += EPS; double nextd = max(nd, d[cur]); pq.push(pdi(nextd, i)); } } printf("%lld\n", (ll)ceil(d[n - 1] / 10) * 10); return 0; }