#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int main() {
  int r, x, y, nx, ny;
  while (scanf("%d%d%d%d%d", &r, &x, &y, &nx, &ny) == 5) {
    if (nx == x && ny == y) {
      printf("0\n");
      continue;
    }
    double d = sqrt((double)(nx - x) * (nx - x) + (double)(ny - y) * (ny - y));
    long long cnt = d / (2 * r);
    long long dd =
        (long long)(nx - x) * (nx - x) + (long long)(ny - y) * (ny - y);
    while (cnt * cnt * r * r * 4 < dd) cnt++;
    while ((cnt - 1) * (cnt - 1) * r * r * 4 >= dd) cnt--;
    cout << cnt << endl;
  }
  return 0;
}
