#include <bits/stdc++.h>
using namespace std;
int main() {
  int rad, x1, y1, x2, y2;
  cin >> rad >> x1 >> y1 >> x2 >> y2;
  int X = x1 - x2;
  int Y = y1 - y2;
  int distanceCarre = pow(X, 2) + pow(Y, 2);
  int w = sqrt(distanceCarre) / (2 * rad) - 1;
  int rq = 4 * pow(rad, 2);
  int n = pow((w + 1), 2) * rq;
  if (rq == distanceCarre) {
    cout << "1";
  } else if (distanceCarre == 0) {
    cout << "0";
  } else if (w <= 0 || distanceCarre == n) {
    cout << w + 1;
  } else {
    cout << w + 2;
  }
  return 0;
}
