#include <bits/stdc++.h>
using namespace std;
struct P {
  int x, y;
  bool operator<(const P &p) {
    if (x != p.x)
      return x < p.x;
    else
      return y < p.y;
  }
};
void subsetGenerate(int n) {
  for (int b = 0; b < (1 << n); b++) {
    vector<int> subset;
    for (int i = 0; i < n; i++) {
      if (b & (1 << i)) subset.push_back(i);
    }
  }
}
void permutationGenerate(int n) {
  vector<int> permutation;
  for (int i = 0; i < n; i++) {
    permutation.push_back(i);
  }
  do {
  } while (next_permutation(permutation.begin(), permutation.end()));
}
bool customSort(int a, int b) { return a < b; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  int dist =
      ceil(1.0 * (sqrt(abs(x - x1) * abs(x - x1) + abs(y - y1) * abs(y - y1))));
  int krugi = ceil(1.0 * dist / (2 * r));
  cout << krugi << endl;
  return 0;
}
