#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, a, b, aa, bb, ct, q;
  cin >> r >> a >> b >> aa >> bb;
  q = (aa - a) * (aa - a);
  q = q + (bb - b) * (bb - b);
  q = sqrt(q);
  if (q % r == 0) {
    if (q / r == 0)
      cout << "0";
    else
      cout << q / r - 1;
  } else
    cout << q / r;
  return 0;
}
