#include <bits/stdc++.h>
using namespace std;
int main() {
  long int r, x1, y1, x2, y2;
  double d;
  long int ans = 0;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  if (x1 == x2 && y1 == y2) {
    cout << "0" << endl;
  } else {
    d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
    double p = 2 * r;
    double ans = d / p;
    cout << (long int)(ceil(ans)) << endl;
  }
  return 0;
}
