#include <bits/stdc++.h>
int main() {
  long long r, x, y, x1, y1, k, c, i;
  scanf("%lld%lld%lld%lld%lld", &r, &x, &y, &x1, &y1);
  c = pow((x1 - x), 2) + pow((y1 - y), 2);
  k = sqrt(c);
  if (k * k == c) {
    if (k % (r * 2) == 0) {
      i = k / (r * 2);
      printf("%lld", i);
    } else {
      i = k / (r * 2);
      printf("%lld", i + 1);
    }
  } else {
    if (k % (r * 2) == 0) {
      i = k / (r * 2);
      printf("%lld", i);
    } else {
      i = k / (r * 2);
      printf("%lld", i + 2);
    }
  }
}
