#include <bits/stdc++.h>
using namespace std;
int r, x[2], y[2];
int main() {
  scanf("%d%d%d%d%d", &r, &x[0], &y[0], &x[1], &y[1]);
  if (x[0] == x[1] && y[1] == y[0]) {
    cout << 0 << endl;
    return 0;
  }
  double dist = sqrt(1.0 * (x[0] - x[1]) * (x[0] - x[1]) +
                     (y[0] - y[1]) * (y[0] - y[1])) -
                2 * r;
  if (dist < 0) {
    cout << 2 << endl;
    return 0;
  }
  r *= 2;
  long long ans = (long long)dist / r;
  if (dist / r > ans) ans++;
  cout << ans + 1 << endl;
  return 0;
}
