#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r, x, y, x1, x2, y1, y2, l, s;
  cin >> r;
  cin >> x1;
  cin >> y1;
  cin >> x2;
  cin >> y2;
  x = pow(x1 - x2, 2);
  y = pow(y1 - y2, 2);
  l = ceil(sqrt(x + y));
  if (l % (2 * r) == 0) {
    s = l / (2 * r);
    cout << s << endl;
  } else {
    s = l / (2 * r);
    s += 1;
    cout << s << endl;
  }
  return 0;
}
