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