#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  double b = 0;
  b = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
  b = b + 2 * r;
  double c = b / 2 / r;
  long long d = c;
  if (c == d) c--;
  d = c;
  cout << d;
  return 0;
}
