#include <bits/stdc++.h>
using namespace std;
int r, x, y, xx, yy;
int main() {
  scanf("%d %d %d %d %d", &r, &x, &y, &xx, &yy);
  long long dis2 =
      (long long)(xx - x) * (xx - x) + (long long)(yy - y) * (yy - y);
  long long ll = 0, rr = 150000, ans = 0;
  while (ll <= rr) {
    long long m = (ll + rr) / 2;
    long long d = (m * r * 2);
    long long tmpd, tmpdis2;
    if (d > 2100000000) {
      tmpd = d;
      tmpdis2 = sqrt(double(dis2));
    } else
      tmpd = d * d, tmpdis2 = dis2;
    if (tmpd >= tmpdis2) {
      ans = m;
      rr = m - 1;
    } else
      ll = m + 1;
  }
  cout << ans << endl;
  return 0;
}
