#include <bits/stdc++.h>
using namespace std;
long long int bigmod(long long int b, long long int p) {
  if (p == 0) return 1;
  long long int my = bigmod(b, p / 2);
  my *= my;
  my %= 10000007;
  if (p & 1) my *= b, my %= 10000007;
  return my;
}
long long int pow(long long int x, long long int y) {
  long long int res = 1;
  for (; y;) {
    if ((y & 1)) {
      res *= x;
    }
    x *= x;
    y >>= 1;
  }
  return res;
}
int gcd(int n1, int n2) { return (n2 == 0) ? n1 : gcd(n2, n1 % n2); }
template <typename T>
string NtoS(T Number) {
  stringstream ss;
  ss << Number;
  return ss.str();
}
int main() {
  long long int a, b, c, ans = 0, n = 0, mx = 0, t;
  long long int x, y, x1, y1, r;
  scanf("%lld %lld %lld %lld %lld", &r, &x, &y, &x1, &y1);
  x = abs(x - x1);
  y = abs(y - y1);
  x = x * x;
  y = y * y;
  x = x + y;
  double X = sqrt(x);
  x = X;
  ans = x / (2 * r);
  if (x == X && x % (2 * r))
    ans++;
  else if (x != X)
    ans++;
  printf("%lld\n", ans);
  return 0;
}
