#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r, x, y, x1, y1, m = 0, steps = 0;
  cin >> r >> x >> y >> x1 >> y1;
  double dist = sqrt(pow(x - x1, 2) + pow(y - y1, 2));
  if ((x - x1) != 0) m = (y - y1) / (x - x1);
  if (x - x1 == 0) {
    steps = abs(y - y1) / (2 * r);
    if (abs(y - y1) % (2 * r) != 0) steps++;
  } else if (m == 1) {
    steps = abs(x - x1) / r;
    if (abs(x - x1) % r != 0) steps++;
  } else if (m == 0) {
    steps = abs(x - x1) / (2 * r);
    if (abs(x - x1) % (2 * r) != 0) steps++;
  }
  if (dist != 0 && steps == 0) steps = 1;
  cout << steps;
  return 0;
}
