#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef long long int ll; typedef vector VI; typedef pair PI; const double EPS=1e-9; const int N = 1010; ll x[N], y[N]; ll dist[N][N]; int main(void){ int n; cin >> n; REP(i, 0, n) { cin >> x[i] >> y[i]; } double m = 0; REP(i, 0, n) { REP(j, 0, n) { ll sq = (x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i]); sq = (sq + 99) / 100; dist[i][j] = ceil(sqrt((long double)sq)); } } REP(k, 0, n) { REP(i, 0, n) { REP(j, 0, n) { dist[i][j] = min(dist[i][j], max(dist[i][k], dist[k][j])); } } } cout << 10 * dist[0][n-1] << endl; }