#include <bits/stdc++.h>
int r;
int x;
int y;
int xx;
int yy;
void input();
int main(void) {
  input();
  return 0;
}
void input() {
  double temp = 0;
  double xr = 0;
  double yr = 0;
  scanf("%d %d %d %d %d", &r, &x, &y, &xx, &yy);
  if (x == xx && y == yy) {
    printf("0\n");
  } else if (x == xx && y != yy) {
    yr = abs(y - yy);
    temp = yr / (r * 2);
    printf("%0.0llf\n", temp);
  } else if (x != xx && y == yy) {
    xr = abs(x - xx);
    temp = xr / (r * 2);
    printf("%0.0llf\n", temp);
  } else {
    xr = abs(x - xx);
    yr = abs(y - yy);
    xr = xr * xr;
    yr = yr * yr;
    temp = sqrt(xr + yr);
    temp = temp / r;
    printf("%0.0llf\n", temp - 1);
  }
}
