#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
};
int main() {
  int r;
  cin >> r;
  point p1;
  cin >> p1.x >> p1.y;
  point p2;
  cin >> p2.x >> p2.y;
  double dist = sqrt(pow((p2.x - p1.x), 2) + pow((p1.y - p2.y), 2));
  int dis = floor(dist);
  if (dis % r == 0) {
    cout << (dis / r) - 1 << endl;
    return 0;
  } else {
    cout << dis / r << endl;
  }
  return 0;
}
