#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using ii = pair<long long int, long long int>;
class prioritize {
 public:
  bool operator()(ii &p1, ii &p2) { return p1.first < p2.first; }
};
auto start_time = high_resolution_clock::now();
void time() { return; }
void ojudge() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  return;
}
int main() {
  ojudge();
  long long int r, x, y, xx, yy;
  cin >> r >> x >> y >> xx >> yy;
  long long int xd = abs(x - xx);
  long long int yd = abs(y - yy);
  long long int dis = sqrt(xd * xd + yd * yd);
  long long int val = ceil(dis / (2.0 * r));
  if (dis * dis < (xd * xd + yd * yd)) val++;
  if (dis < (2 * r) && dis) val--;
  cout << val << "\n";
  time();
  return 0;
}
