#include <bits/stdc++.h>
using namespace std;
const int MOD = int(1e9) + 7;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-9;
const double PI = acos(-1.0);
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int r, x1, y1, x2, y2;
  while (cin >> r >> x1 >> y1 >> x2 >> y2) {
    double k1 = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    if (fmod(k1, r * 2) == 0) {
      cout << k1 / (r * 2) << endl;
      continue;
    }
    int k2 = abs(x1 - x2) + abs(y1 - y2);
    cout << k2 / (r * 2) << endl;
  }
}
