#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x1, y1, x2, y2, r;
  long long k;
  double d;
  while (~scanf("%lld%lld%lld%lld%lld", &r, &x1, &y1, &x2, &y2)) {
    if (x1 == x2 && y1 == y2) {
      printf("0\n", 0);
      continue;
    }
    d = sqrt(1.0 * (x1 - x2) * (x1 - x2) + 1.0 * (y1 - y2) * (y1 - y2));
    r = r * 2;
    k = (long long)ceil(d / r - 1e-15);
    printf("%lld\n", k);
  }
  return 0;
}
