#include <bits/stdc++.h>
using namespace std;
int main() {
  long int r, x, y, a, b;
  cin >> r >> x >> y >> a >> b;
  long long int p;
  p = (pow((a - x), 2)) + (pow((b - y), 2));
  int d = sqrt(p);
  if (d == 0)
    cout << "0";
  else if (d % r == 0) {
    cout << ((d / r) - 1);
  } else {
    int n = d / 2;
    if (n >= r) {
      int m = r;
      while (m < n) m = m + (2 * r);
      m = m - r;
      m = m / 2;
      m = m / r;
      cout << ((2 * m) + 1);
    } else {
      cout << "2";
    }
  }
}
