#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  double dist = sqrt(pow(x1 - x, 2) + pow(y1 - y, 2));
  int t = 0;
  if (r == 1) {
    t = floor(dist / r) - 1;
  } else {
    t = ceil(dist / r) - 1;
  }
  int ans = max(t, 0);
  cout << ans << endl;
}
