#include <bits/stdc++.h>
int rt(int n, int* p) {
  int i;
  for (i = 0; i * i <= n; i++)
    ;
  if ((i - 1) * (i - 1) == n) {
    *p = 1;
  }
  return i - 1;
}
int main() {
  int r, x, y, nx, ny, flag = 0;
  scanf("%d%d%d%d%d", &r, &x, &y, &nx, &ny);
  int root = rt((nx - x) * (nx - x) + (ny - y) * (ny - y), &flag);
  if (flag == 1)
    printf("%d\n", root / (2 * r));
  else
    printf("%d\n", root / (2 * r) + 1);
  return 0;
}
