#include <bits/stdc++.h>
using namespace std;
const long long Maxn = 1e6;
int main() {
  int r, x, y, n, m, R;
  int sim;
  scanf("%d %d %d %d %d", &r, &x, &y, &n, &m);
  R = (2 * r) * (2 * r);
  long long nn = (n - x) * (n - x);
  long long mm = (m - y) * (m - y);
  long long nm = nn + mm;
  double kk = sqrt(nm);
  int hh = (int)kk;
  if (hh * hh == nm) {
    if (hh % (2 * r) == 0)
      sim = hh / (2 * r);
    else
      sim = (hh / (2 * r)) + 1;
  } else {
    hh++;
    if (hh % (2 * r) == 0)
      sim = hh / (2 * r);
    else
      sim = (hh / (2 * r)) + 1;
  }
  printf("%d", sim);
}
