#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
} p[111];
set<point> s;
bool operator<(const point &a, const point &b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
double distance(point a, point b) {
  return ((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double dbequal(double x, double y) {
  if (abs(x - y) < 1e-6) return 1;
  return 0;
}
int main() {
  long long r;
  scanf("%lld%lld%lld%lld%lld", &r, &p[1].x, &p[1].y, &p[2].x, &p[2].y);
  long long dis = distance(p[1], p[2]);
  long long n = sqrt(dis / (4 * r * r));
  long long x = 0;
  for (long long i = max(x, n - 1); i <= n + 2; i++) {
    if (i * i * 4 * r * r >= dis) {
      printf("%lld\n", i);
      break;
    }
  }
  return 0;
}
