#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long r, a, b, c, d;
  cin >> r >> a >> b >> c >> d;
  long long ds, nrr;
  ds = ((c - a) * (c - a)) + ((d - b) * (d - b));
  nrr = 2 * r;
  if (a == c && b == d)
    cout << "0\n";
  else if (ds == (nrr * nrr))
    cout << "1\n";
  else {
    long long ans = 1, fd, nr;
    nr = nrr;
    do {
      ans++;
      fd = nr + r;
      nr = fd + r;
      if (ds == (nr * nr)) break;
    } while (ds > (fd * fd));
    cout << ans << endl;
  }
  return 0;
}
